[xsl] fo:page-number-citation and dynamic id's

Subject: [xsl] fo:page-number-citation and dynamic id's
From: Alexander.RACHER@xxxxxxxx
Date: Thu, 18 May 2006 16:22:07 +0200
hi,
i'm using xsl 1.0 and apache fop 0.92.

is there any possibility in fo to use dynamic id's in xsl / xsl-fo?

background of my question:
i need to generate 2 nearly identical (only one fo:block is different =
address --> one document per address) output-docs. so i wrapped a
xsl:for-each around the fo:page-sequence in my stylesheet. works great,
also could reset the page-count in the second document (
initial-page-number="1"). so for an output in pdf with 4 pages per
individual document and 2 adressen/element i get 8 pages, which consist of
2 documents, each correctly page-numbered from 1 to 4.

only one problem came up:
i want to include page-numbers in the footer which look like 'page x of y'
(also to be able to easily distinguish the 2 docs in my output-pdf). as
long as only one document was the output, it worked. but if the whole
fo:page-sequence is parsed more than one time, the solution with <
fo:page-number-citation ref-id="last-page"/> didn't work any more because
of multiple <fo:block id="last-page"/> (FOP-exception: "Property id
"last-page" previously used; id values must be unique in document.").

so my question is: is there any possibility in xsl / xsl-fo to generate
such id's (which, in contrary to the 'generate-id()'-function, can also be
called)? the concept i have in my mind is, that i generate one id
'last-page' for each //adressen/element , so each partial-output-document
can be page-numbered like 'page x of y'.

here's the relevant part of my xml:
[...]
<xsl:for-each select="//adressen/element">
<fo:page-sequence master-reference="blattA4" initial-page-number="1"
force-page-count="no-force">
<fo:static-content flow-name="xsl-region-before">
[...]
<fo:blockalign="end">
<fo:page-number/> von <fo:page-number-citation ref-id="last-page"/>
</fo:block>
[...]
<fo:block id="last-page"/>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>
</fo:root>
</xsl:template>

any ideas?

cheers
alex



______________________________________________________________________
Der Austausch von Nachrichten mit Software Daten Service via E-Mail dient
ausschliesslich Informationszwecken. Rechtsgeschaeftliche Erklaerungen duerfen
ueber dieses Medium nicht ausgetauscht werden.

Correspondence with Software Daten Service via e-mail is only for information
purposes. This medium is not to be used for the exchange of legally-binding
communications.

Current Thread