On 17 Jun 2009, at 09:45, Steve Kwee wrote:
> i have a somewhat strange requirement on rendering page-numbers:
>
> My customer wants the number of the next-page in the page-footer.
> "-2-" on the first page
> "-3-" on the second page
> ...
> nothing on the last page
To start a fo:page-sequence with a predefined page-number, there is
the property 'initial-page-number'[*] you can specify on the page-
sequence element. This is supported by FOP, so you should be able to
make use of that.
For the surrounding dashes, XSL-FO 1.1 offers fo:folio-prefix and
fo:folio-suffix[**] to decorate all fo:page-numbers or fo:page-number-
citations in a page-sequence. FOP, unfortunately, does not yet support
those, so for the moment, you'll have to add the prefix and suffix
manually (by means of plain text, fo:inlines or fo:wrappers).
[*]
http://www.w3.org/TR/xsl/#initial-page-number[**]
http://www.w3.org/TR/xsl/#fo_folio-prefixTo omit the page-number entirely on the last page, define a simple-
page-master with a different region-after, and use it in the page-
sequence-master as a conditional-page-master-alternative with page-
position="last". (Note that FOP 0.95 or earlier still has an issue
with using that page-master in case it is the only page, but this
behavior has been fixed in FOP Trunk) Just give us a yell if you need
further assistance with this.
> Searching the list I understand that XSL processing and FOP
> processing are
> separate with not feedback. So I understand that there is no way
> counting pages in an xsl-variable and then doing some arithmetic
> with that.
Not necessary, see above. I believe your requirements can be met
without resorting to special XSLT processing.
HTH!
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail:
fop-users-unsubscribe@...
For additional commands, e-mail:
fop-users-help@...