Help for multiple page sequences within the single document

Here should go questions about transforming XML with XSLT and FOP.
Zarko
Posts: 1
Joined: Wed Oct 25, 2006 4:17 pm

Help for multiple page sequences within the single document

Post by Zarko »

Hello everyone,

I am pretty new to xsl-fo and fop, so I would appreciate a little help.

We have an application that generates multiple reports as a single document using apache fop 0.20.5.
Every single report within this document should have pagination in form of

Code: Select all

<fo:page-number/>/<fo:page-number-citation ref-id="lastPage>
in its static content.
My problem is that there cannot be more than one ref-id with same name in a single document, and final result should be a single document with multiple page sequences like:1/3, 2/3, 3/3, 1/4, 2/4, 3/4, etc...

Is there any solution to this problem???
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

What do you mean there cannot be more than one ref-id with same name in a single document ? That is the purpose of the ref-id attribute, to refer the same id attribute from different locations of the XSL-FO document. The value of the id attribute must be unique in the document, that is you have to use an id attribute for the last page of each report included in your XSL-FO document:

Code: Select all

<fo:block id="lastPageReport1" text-align="center" ...>
and then refer it from each page of that report:

Code: Select all

<fo:page-number/> / <fo:page-number-citation ref-id="lastPageReport1"/>

Regards,
Sorin
Post Reply