[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Questions about page-number-citation?

Subject: RE: Questions about page-number-citation?
From: PIERRES@xxxxxxxx
Date: Sat, 29 Mar 2003 12:59:50 +0800
fo page number citation
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.