Dear Gil,

this is super, thank you *very* much!!

On 24.02.2020 19:48, Gil Barmwater wrote:
>
> It is time to make the package available to this group! I have updated the 
> package, zipped it up,
> transferred it to another system, installed it and successfully built the 
> rexxref, rxmath and
> readme documents. I apologize for the size of the package - 33.2 MB - but 
> most of that size is due
> to FOP. I strongly recommend that after downloading it from here
> <https://www.dropbox.com/s/s5d9mwx63xru1tk/orxbldoc.zip?dl=0> that you first 
> extract only the
> read1st.txt file. It will explain the installation requirements as well as 
> how to use it.
>
Have downloaded everything and will look into it ASAP (may take a few days 
though) as I would like
to become able to generate the docs myself as well.

> Just a couple of comments: as I have not attempted to build all of the ooRexx 
> documents, I suspect
> that there are still some "surprises" lurking out there. I have not solved 
> the "extra" levels
> issue in the TOC but felt this was not a serious enough problem to delay 
> making the package
> available. And, of course, any questions, comments, criticisms or suggestions 
> for improvement are
> welcome.
>
Ad TOC: maybe this <http://www.sagehill.net/docbookxsl/TOCcontrol.html> can be 
of help?

Best regards

---rony


> On 2/23/2020 3:56 PM, Gil Barmwater wrote:
>>
>> I have added the templates to the pdf.xsl file I have been using and deleted 
>> the call to
>> fop-preprocess.rex. When I run the doc2fo and the fo2pdf steps I get what 
>> appears to be the same
>> result as when using the fop-preprocess script! Here
>> <https://www.dropbox.com/s/oqx1wrddr75opk2/rexxref.zip?dl=0> is a link to a 
>> zipped version in my
>> Dropbox. I will proceed to update my package and documentation and should 
>> have something
>> available soon...
>>
>> Gil
>>
>> On 2/23/2020 12:06 PM, Gil Barmwater wrote:
>>>
>>> Wow! I had suspected it might be possible to accomplish the blank line 
>>> removal by modifying the
>>> stylesheet template for the programlisting element but never got around to 
>>> exploring what would
>>> be required (and learning a lot more XSLT). I will add this to the pdf.xsl 
>>> file and give it a go.
>>>
>>> Gil
>>>
>>> On 2/23/2020 11:06 AM, Erich Steinböck wrote:
>>>> Removal of unwanted leading/trailing whitespace from a DocBook 
>>>> <programlisting> element with a
>>>> "fop preprocessing" script was just my bad hack and should be abandoned.
>>>>
>>>> Please add the following code to the xsl style sheet - this should take 
>>>> care of what we want. 
>>>> The script invocation should be removed.
>>>>
>>>> ~~~
>>>> <!-- strip leading and trailing whitespace from programlisting
>>>>      see 
>>>> https://lists.oasis-open.org/archives/docbook-apps/200304/msg00334.html
>>>> -->
>>>> <xsl:template match="programlisting/text()">
>>>>   <xsl:variable name="before" select="preceding-sibling::node()"/>
>>>>   <xsl:variable name="after" select="following-sibling::node()"/>
>>>>
>>>>   <xsl:variable name="conts" select="."/>
>>>>
>>>>   <xsl:variable name="contsl">
>>>>     <xsl:choose>
>>>>       <xsl:when test="count($before) = 0">
>>>>         <xsl:call-template name="remove-lf-left">
>>>>           <xsl:with-param name="astr" select="$conts"/>
>>>>         </xsl:call-template>
>>>>       </xsl:when>
>>>>       <xsl:otherwise>
>>>>         <xsl:value-of select="$conts"/>
>>>>       </xsl:otherwise>
>>>>     </xsl:choose>
>>>>   </xsl:variable>
>>>>
>>>>   <xsl:variable name="contslr">
>>>>     <xsl:choose>
>>>>       <xsl:when test="count($after) = 0">
>>>>         <xsl:call-template name="remove-ws-right">
>>>>           <xsl:with-param name="astr" select="$contsl"/>
>>>>         </xsl:call-template>
>>>>       </xsl:when>
>>>>       <xsl:otherwise>
>>>>         <xsl:value-of select="$contsl"/>
>>>>       </xsl:otherwise>
>>>>     </xsl:choose>
>>>>   </xsl:variable>
>>>>
>>>>   <xsl:value-of select="$contslr"/>
>>>>
>>>> </xsl:template>
>>>>
>>>>
>>>> <!-- eats linefeeds from the left -->
>>>> <xsl:template name="remove-lf-left">
>>>>   <xsl:param name="astr"/>
>>>>
>>>>   <xsl:choose>
>>>>     <xsl:when test="starts-with($astr,'&#xA;') or
>>>>                     starts-with($astr,'&#xD;')">
>>>>       <xsl:call-template name="remove-lf-left">
>>>>         <xsl:with-param name="astr" select="substring($astr, 2)"/>
>>>>       </xsl:call-template>
>>>>     </xsl:when>
>>>>     <xsl:otherwise>
>>>>       <xsl:value-of select="$astr"/>
>>>>     </xsl:otherwise>
>>>>   </xsl:choose>
>>>> </xsl:template>
>>>>
>>>> <!-- eats whitespace from the right -->
>>>> <xsl:template name="remove-ws-right">
>>>>   <xsl:param name="astr"/>
>>>>
>>>>   <xsl:variable name="last-char">
>>>>     <xsl:value-of select="substring($astr, string-length($astr), 1)"/>
>>>>   </xsl:variable>
>>>>
>>>>   <xsl:choose>
>>>>     <xsl:when test="($last-char = '&#xA;') or
>>>>                     ($last-char = '&#xD;') or
>>>>                     ($last-char = '&#x20;') or
>>>>                     ($last-char = '&#x9;')">
>>>>       <xsl:call-template name="remove-ws-right">
>>>>         <xsl:with-param name="astr"
>>>>           select="substring($astr, 1, string-length($astr) - 1)"/>
>>>>       </xsl:call-template>
>>>>     </xsl:when>
>>>>     <xsl:otherwise>
>>>>       <xsl:value-of select="$astr"/>
>>>>     </xsl:otherwise>
>>>>   </xsl:choose>
>>>> </xsl:template>
>>>> ~~~
>>>>
>>>> The reason why I didn't just go through all our doc XML's and remove 
>>>> unwanted whitespace from
>>>> <programlisting>'s, is that it not only would have been a lot of work, but 
>>>> it also would make
>>>> the examples more difficult to read or copy/paste (for the developer, not 
>>>> the user) as the
>>>> <programlisting> and CDATA markup would have to be all on the same line as 
>>>> the first line of
>>>> the example.  I had changed a few examples like this, but then didn't like 
>>>> it at all.
>>>>
>>>> This still leaves us with quite a bit of unwanted whitespace from our 
>>>> <indexterm>'s, but that's
>>>> another story.
>>>>

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to