[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: RE: DOCBOOK-APPS: page break
Getting a processing instruction to throw an attribute into the next generated fo:block is impossible. In order to get the FO code that you want, you would have to customize the template for every block-generating element before which you may want to generate a page break, for example: <xsl:template match="figure"> <fo:block> <xsl:if test="processing-instruction('fo-page-break')"> <xsl:attribute name="break-before">page</xsl:attribute> </xsl:if> <!-- Remainder of template copied from distribution. apply-imports won't give you what you want --> </fo:block> </xsl:template> But, I am quite certain that an empty fo:block will not generate any space. If it does, you can probably fix it by specifically setting certain attributes to zero: - padding - space-before - space-after - font-size - height Jeff Beal -----Original Message----- From: ~ion~ [mailto:vnhu38f93@subdimension.com] Sent: Monday, December 16, 2002 4:00 PM To: docbook-apps Subject: DOCBOOK-APPS: page break I wanted this output in the XSL-FO: <fo:block break-before="page"> blah blah blah </fo:block> But I didn't know how to put this into my customisation layer so I tried: <!-- page-break support --> <xsl:template match="processing-instruction('fo-page-break')"> <fo:block break-before="page"/> </xsl:template> And then inserted <?fo-page-break?> Into the DocBook document where a page break was required. I don't like this because it is dirty and produces: <fo:block break-before="page"/> <fo:block> blah blah blah </fo:block> Which is sub-optimal because ideally I think the page break should be in the fo block that wraps the text that should appear on a new page. <-- Does this reasoning make sense or does it not matter? Is it OK to do this albeit quite dirty? Can anyone think of any side-effects that might occur? ~io~
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC