RE: [xsl] XSL-FO conditional pagination and content

Subject: RE: [xsl] XSL-FO conditional pagination and content
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Sat, 27 Mar 2004 14:42:15 +0100
> -----Original Message-----
> From: Greenbaum, Bill (by way of B Tommie Usdin)
<snip />

> Until now, I'd solved this problem with one simple page-sequence.
> Now I want to add some summary content at the beginning of the rest
> only, either part of the region-before area, or part of the body.  I've
> tried to test for the value of <fo:page-number/> in my XSL-T
> stylesheet, something like:
>    <xsl:variable name="pgNumber"><fo:page-number/></xsl:variable>
>    <xsl:if test="$pgNumber &gt; 1">
>       optional content goes here
>    </xsl:if>
> However, <fo:page-number/> does not appear to be readable to the
> elements in the xsl: namespace.

Nope. The Formatting Process should be looked at as a step in the process
that's separated from the XSL transform. So, in short: at XSLT stage,
nothing is known about the actual page-layout. The fo:page-number is
calculated during the formatting process, and so it is not available as a
*value* to the XSL processor (only as an empty node in the FO namespace).

Maybe you don't need the XSL processor to have access to this value after
all (?)
You can pick up an fo:page-number from a page further downstream, by placing
an fo:block with an id attribute on the same page. Then you can use
fo:page-number-citation to retrieve the page-number of that page at a
location upstream (like static-content).

OTOH you could try solving this by making use of

Just give a yell if you need more info.



Current Thread