OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Questions on verbatim output


On Thursday 22 November 2007 08:39:49 Bob Stayton wrote:
> > First, is it possible to make them less verbatim; specifically, to limit
> > the width to (say) 80 columns?  [...]
>
> Yes, you can do this if you aren't using FOP.  See this reference:
>
> http://www.sagehill.net/docbookxsl/FittingText.html#BreakLongLines

[note to self, must re-read "DocBook XSL: The Complete Guide"; it's full of 
useful stuff]

Unfortunately, I'm using FOP.  Fortunately, FOP v0.93 now supports 
the "wrap-option" attribute; but, unfortunately, it doesn't support 
the "hyphenation-character" attribute.

... which is good enough for me.

> > [...]  Is it possible to further customise
> > the FO XSLT so (for example) screen has one background- and border-colour
> > whilst programlistings have a different bg- and border-color?
>
> You can put choose statements inside an xsl:attribute inside an
> xsl:attribute-set, and select based on self::screen or
> self::programlisting.  Here is an example from another part of my book:
>
> <xsl:attribute-set name="formal.title.properties">
>   <xsl:attribute name="text-align">
>     <xsl:choose>
>       <xsl:when test="self::table">center</xsl:when>
>       <xsl:otherwise>left</xsl:otherwise>
>     </xsl:choose>
>   </xsl:attribute>
> </xsl:attribute-set>
> You have to do this with each property.  Be sure to include an
> xsl:otherwise so you don't leave an empty attribute.

Ah!  Excellent.  That's exactly what I wanted.

Thank!

Paul.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]