Subject: RE: [xsl] Questions about page-number-citation? From: PIERRES@xxxxxxxx Date: Sat, 29 Mar 2003 12:59:50 +0800 |
Hi Ken, Thanks for your reply! I did it using your advice. Thank you very much! Pierre So -----Original Message----- From: G. Ken Holman [mailto:gkholman@xxxxxxxxxxxxxxxxxxxx] Sent: Friday, March 28, 2003 9:47 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Questions about page-number-citation? At 2003-03-28 10:49 +0800, PIERRES@xxxxxxxx wrote: >I want to generate a duplex document. > >The document's first back page (i.e. second page) would contain some static >information >and must be printed (i.e. the document have minimum two page). >All the pages except the back page would contain the main content. If you are *positive* you will not have any main content on the back page, then you can put the target of your citation in the static content targeted for the back page. >I want to show the page number at each page footer using the format ><fo:page-number> of <fo:page-number-citation ref-id="terminator"> >where the terminator is the last fo:block of the whole document. > >The question is when the main content is not enough to fill one page, >the footer of back-page would become Page 2 of 1. Now you are indicating that perhaps some of your content can flow to the back page ... in this case I *think* you are out of luck because if you flow the terminating id on *both* the last page of content and the blank page, then the formatter will find the next to last page first and you will get the wrong result. Wait! There is a way ... you will need a number of page masters: <page-sequence-master master-name="sequence"> <repeatable-page-master-alternatives> <conditional-page-master-reference blank-or-not-blank="blank" master-reference="blank"/> <conditional-page-master-reference page-position="last" master-reference="frame-last"/> <conditional-page-master-reference master-reference="frame"/> </repeatable-page-master-alternatives> </page-sequence-master> Next, you need static content for the "blank" page to contain the ending block, and you need static content for the "frame-last" page to contain the ending block, and don't put any ending block in your flow at all or in any of the static content for "frame". If the formatter needs a blank page to fill it out, that condition is found first and used and it has the ending block. If the formatter doesn't need a blank page, then the flow of your last page will go to the master with the static content with the ending block. For every other page the page goes out to the master without the static content with the ending block. I just tested the above with Antenna House and it works fine. This was an interesting requirement to resolve! I hope this helps. ....................... Ken -- Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO North America: June 16-20, 2003 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 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-10-1 Practical Formatting Using XSL-FO Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Questions about page-numb, G. Ken Holman | Thread | RE: [xsl] identifying elements by c, Jarno . Elovirta |
[xsl] newbie needs assistance gener, Ray Tayek | Date | RE: [xsl] simple matching problem, Michael Kay |
Month |