[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] fo pagebreaks in refentries
On Fri, Oct 31, 2003 at 12:19:33PM +0000, Brian McGurk wrote: > > Hi, > > I have an API description in docbook, where each function is a > refentry. The problem is that the transformation to fo puts a page > break before each function. Is there an easy way to stop this? I had a > look in xsl-stylesheets/fo/refentry.xsl and found the following: > <xsl:choose> > <xsl:when test="not(parent::*) or parent::reference or parent::part"> > <!-- make a page sequence --> > <!-- ... other stuff ... --> > </xsl:when> > <xsl:otherwise> > <fo:block break-before="page"> > <xsl:copy-of select="$refentry.content"/> > </fo:block> > </xsl:otherwise> > </xsl:choose> > but I'm very new to XSLT and docbook and don't know how to override > that or whether doing so is wise. I'm using xsltproc. > > Any help would be appreciated. The simplest change would be to copy the whole template to your customization layer and change this line: <fo:block break-before="page"> to something like: <fo:block space-before="2em"> That said, I think it would be a good idea if the template was written with this property controlled by an attribute-set rather than being hardcoded. Define the attribute-set at the top level: <xsl:attribute-set name="refentry.properties"> <xsl:attribute name="page-break">before</xsl:attribute> </xsl:attribute-set> and in the template, use the attribute set: <fo:block xsl:use-attribute-sets="refentry.properties"> <xsl:copy-of select="$refentry.content"/> </fo:block> Then you could reset page-break="none" in your customization layer. You would have to explicitly reset it to 'none' rather than omit it because like-named attribute-sets are merged at runtime. And you could add any other attributes, such as space-before or maybe even border-before properties if you want a rule line to separate refentry elements. I went ahead and filed an RFE on sourceforge for this feature. Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]