can you please explain me how to count the page in a fo with an xslt? 





-----Ursprungliche Nachricht-----
Von: Chuck Paussa [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 25. April 2002 17:03
An: [EMAIL PROTECTED]
Betreff: Re: AW: page count


Henrik,

There is no way to do what you want in FO in one pass. What you'll need 
to do is generate the fo: document with some marked up place holders in 
it. Something like <fo:block placeholder="PutTotalPagesHere"/>. Then run 
that document through an XSLT transformation that adds up the total 
number of pages and replaces those special blocks with the information 
you want. (You'll see this technique referred to in the archives as 
"Making a second pass" over the document.) You can then use FOP to 
generate the output you want.

Chuck

 > Henrik Holle wrote:
 >
 > I have various page-sequences in my document:
 >
 > <fo:page-sequence master-reference="NameOfMasterReference" 
initial-page-number="1">
 >
 > but at the end of the document i need to count the whole pages of all 
page-sequences.
 >
 > !<fo:page-number-citation ref-id = "lastBlock"/>! does not work!
 > -----Ursprungliche Nachricht-----
 > Von: Ian Taylor [mailto:[EMAIL PROTECTED]
 > Betreff: Re: page count
 >
 > I put this in my <xsl:region-after>
 >
 > <fo:block font-size="9pt" line-height="11pt" text-align="end"> Page 
no: <fo:page-number/> of <fo:page-number-citation ref-id = "lastBlock"/> 
</fo:block> where the last block in the document looks like this 
<fo:block id = "lastBlock"/>
 >
 > Ian
 > At 12:54 PM 4/24/2002 +0200, you wrote:
 >
 > Hello,
 >
 > I want to write something like "page x of y" where y is the number of 
pages in my document. "x" is generated by "<fo:page-number/>" but how do 
I get "y"??
 >
 > Harald




Reply via email to