This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Verbatim output w/ shade.verbatim and XEP
- From: Johann Richard <Johann dot richard at dspfactory dot ch>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 20 Jan 2003 09:09:05 +0100
- Subject: DOCBOOK-APPS: Verbatim output w/ shade.verbatim and XEP
- Sensitivity: Company-Confidential
Hi all,
I recently discovered a peculiar behaviour of which I think, it is a bug in XEP <= 3.17 from RenderX, but anyway. When you use <screen/>'s, <snyopsis/>' or <programlisting/>'s and have shade.verbatim set to '1', then XEP will put extra whitepsace before and after this verbatim block.
I wonder if
a) others observed the same behaviour and
b) if this could be fixed in the Stylesheets for the public
I could track down this behaviour to the FO template in fo/verbatim.xsl where the template for programlisting & co says
[...]
<fo:block wrap-option='no-wrap'
white-space-collapse='false'
linefeed-treatment="preserve"
xsl:use-attribute-sets="monospace.verbatim.properties">
<xsl:choose>
<xsl:when test="$shade.verbatim != 0">
<fo:block space-before="0pt" space-after="0pt"
xsl:use-attribute-sets="shade.verbatim.style">
<xsl:copy-of select="$content"/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$content"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
[...]
While the nested <fo:block/>'s that are produced for shaded verbatim are -- of course ;) -- completely legal XSL:FO, I wanted to ask if the template could not be changed to something similar like
[ ... ]
<xsl:choose>
<xsl:when test="$shade.verbatim != 0">
<fo:block wrap-option='no-wrap'
white-space-collapse='false'
linefeed-treatment="preserve"
xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">
<xsl:copy-of select="$content"/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block wrap-option='no-wrap'
white-space-collapse='false'
linefeed-treatment="preserve"
xsl:use-attribute-sets="monospace.verbatim.properties">
<xsl:copy-of select="$content"/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
[ ... ]
which circumvents this whitespace problem on the one hand and create "simpler" output on the other hand (which might have an influence on processing perfomance, but I wouldn't insist on that :))
Thanks for any comment on this.
Best regards,
Johann Richard
********************************************
Johann Richard
IC & DSP Design Engineer
Dspfactory SA
Champs-Montants 12a
2074 Marin-Epagnier
Switzerland
Tel: +41 32 755 7400
Fax: +41 32 755 7401
e-mail: mailto:johann.richard@dspfactory.ch
http://www.dspfactory.com
********************************************