W3C home > Mailing lists > Public > www-xsl-fo@w3.org > November 2002

Re: problem with page-numbering

From: W. Eliot Kimber <eliot@isogen.com>
Date: Thu, 07 Nov 2002 09:31:21 -0600
Message-ID: <3DCA8749.8080804@isogen.com>
To: jkirmse@w3.org
CC: www-xsl-fo@w3.org

jkirmse@w3.org wrote:
> hi
> i have a problem with the page-numbering.
> is it possible to calculate with
> fo:page-number and fo:page-number-citation so that
> i do something like this:
> 
> <fo:page-number-citation/> - (<fo:page-number/> - 1) ???

Yes. fo:page-number can go anywhere.

> the other question: is it possible to 
> put fo:page-number in <xsl:variable/>  ???

You can put the literal element <fo:page-number> in a variable, but I 
don't think that's what you're asking for.

The page number won't be known until the FO instance generated by the 
XSLT is rendered--thus the XSLT can have no knowledge of what pages a 
given element being generated might fall on. This is a fundamental 
aspect of XSL that is an unavoidable side effect of it's generality.

However, it is possible in theory for FO implementations to enable the 
generation of data files that map input XML or FO element instances to 
page numbers. This data could then be fed back into a second pass to 
make the initial XSLT process page-number aware. XEP already has some 
extensions that could be used for this.

But, if you simply want to reflect the page number of a given FO 
construct, you should be able to do it with fo:page-number or 
fo:page-number-citation without restriction or limitation.

Cheers,

Eliot
-- 
W. Eliot Kimber, eliot@isogen.com
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139
Received on Thursday, 7 November 2002 10:30:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:10 GMT