Forest, Sebastien wrote:
Hi!
I want to use the page-position="last" in fo:conditional-page-master-reference but it is not implemented yet. Is there a workaround?
No workarounds in general.
Here is my problem:
Suppose I have a document of 6 pages. The last page (page 6) is blank because I have to keep the document even.
On the last not-blank page (page 5) I need to write "5 of 6" in the footer (because the document end with a blank page).
If you have some idea of number of pages you can write enough single-page-master-references to cover all possibilities, e.g.
<fo:page-sequence-master master-name="all"> <fo:single-page-master-reference master-reference="page1"/> <fo:single-page-master-reference master-reference="page2"/> <fo:single-page-master-reference master-reference="page3"/> <fo:single-page-master-reference master-reference="page4"/> <fo:single-page-master-reference master-reference="page5"/> <fo:single-page-master-reference master-reference="page6"/> </fo:page-sequence-master>
Of course, youll need to write static content for each page in the page-sequence.
If there can be potentially hundreds of pages then this clearly becomes too difficult, and your stuck I'm afraid.
Because I can't use "last" I thinking about a way to know the current page number and use a xsl:choose in the footer to know if I have to write "x of n" or just "x" but I still can't find a way to get the current page number.
If you mean get the current page number into an xsl:choose, you cant. Everything in the XSL namespace is processed by XSLT before FOP receives an XSL-FO document. There is no feedback from layout to the XSLT stage, both processes are completely independent.
<snip/>
Chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
