Re: DOCBOOK-APPS: Messy FOP

From
vnhu38f93 <>
Date
2002-07-26T13:37:42+00:00
ID
Thread
Re: DOCBOOK-APPS: Messy FOP
This doesn't seem to work, I put the template in my custom
layer, is this where I should have put it? because it did
not
work.  The other approach suggested by Harm Kok worked, so
what advantage would this approach confer? which is the
correct way of going about it?


> That's a justification issue.  FOP isn't smart enough to
turn justification
> off when it's preserving white space.  This template fixes
the problem
> (using the 1.50.0 XSL Stylesheets)
>
> <xsl:template match="programlisting|screen|synopsis">
>   <xsl:param name="suppress-numbers" select="'0'"/>
>   <xsl:variable name="vendor"
select="system-property('xsl:vendor')"/>
>   <xsl:variable name="id"><xsl:call-template
> name="object.id"/></xsl:variable>
>
>   <xsl:choose>
>     <xsl:when test="$suppress-numbers = '0'
>                     and @linenumbering = 'numbered'
>                     and $use.extensions != '0'
>                     and $linenumbering.extension != '0'">
>       <xsl:variable name="rtf">
>         <xsl:apply-templates/>
>       </xsl:variable>
>       <fo:block wrap-option='no-wrap'
>                 white-space-collapse='false'
>                 linefeed-treatment="preserve"
>                
xsl:use-attribute-sets="monospace.verbatim.properties"
>                         text-align="left">
>         <xsl:call-template name="number.rtf.lines">
>           <xsl:with-param name="rtf" select="$rtf"/>
>         </xsl:call-template>
>       </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"
>                         text-align="left">
>         <xsl:apply-templates/>
>       </fo:block>
>     </xsl:otherwise>
>   </xsl:choose>
> </xsl:template>
>
> Jeff Beal
> Ansys, Inc.
> (724)514-3150
> 
_____________________________________________________________________
// free anonymous email || forums \\ subZINE || anonymous browsing 
            subDIMENSION -- http://www.subdimension.com