[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
At 2002-01-21 13:37 -0500, Matthew L. Avizinis wrote:
Save it? No ... but place into the FO stream a placeholder replaced by the formatter with the page number of the last page, yes.
Create an anchor at the end of your last page sequence, and then do a page number citation to that last anchor wherever you need a total count of pages. Personally, I use the generated identifier of the root node for this last anchor so as to not interfere with generated identifiers of my other hyperlinks:
Page <page-number/> of <page-number-citation ref-id="generate-id(/)"/>
This handles most of the cases for citing the last page, but does not handle an extreme boundary condition that I identified to the working group (involving floats), but could not be accommodated in the final version of 1.0 ... hopefully it will be addressed in the next version of XSLFO.
If you aren't using floats, the above works just fine.
I hope this helps.
........................... Ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] output last page number
Subject: Re: [xsl] output last page number From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 21 Jan 2002 14:11:55 -0500 |
At 2002-01-21 13:37 -0500, Matthew L. Avizinis wrote:
Is there a way to save the last page number for later use, such as to write it to a temporary file?
Save it? No ... but place into the FO stream a placeholder replaced by the formatter with the page number of the last page, yes.
Create an anchor at the end of your last page sequence, and then do a page number citation to that last anchor wherever you need a total count of pages. Personally, I use the generated identifier of the root node for this last anchor so as to not interfere with generated identifiers of my other hyperlinks:
Page <page-number/> of <page-number-citation ref-id="generate-id(/)"/>
This handles most of the cases for citing the last page, but does not handle an extreme boundary condition that I identified to the working group (involving floats), but could not be accommodated in the final version of 1.0 ... hopefully it will be addressed in the next version of XSLFO.
If you aren't using floats, the above works just fine.
I hope this helps.
........................... Ken
-- Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO - Feb 18-22, 2002
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) ISBN 0-13-065196-6 Definitive XSLT & XPath ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-07-1 Practical Formatting Using XSLFO XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed), articles, training(instructor-live,Internet-live,web/CD,licensed) Next public training: 02-02-11,12,14,15,18,21,03-04,05,06,08,11, - 04-08,09,10,12,05-14,15,06-04,07
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] output last page number, Matthew L. Avizinis | Thread | Re: [xsl] output last page number, Patrick Durusau |
[xsl] Re: we owe SUN?, Dimitre Novatchev | Date | Re: [xsl] output last page number, Patrick Durusau |
Month |