Re: problem with page-numbering

"W. Eliot Kimber" <[email protected]>
Newsgroups gmane.text.xml.xsl.general
Organization ISOGEN International
Message-ID <[email protected]>
[email protected] 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, [email protected]
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.