W3C home > Mailing lists > Public > www-xsl-fo@w3.org > December 2002

Re: last page and first page at the same time

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Thu, 05 Dec 2002 07:15:51 -0500
Message-Id: <>
To: <www-xsl-fo@w3.org>

At 2002-12-05 02:40 -0500, Gilhuijs, Patrick wrote:
>Well, indeed I'm a new user of xsl-fo but, I came up the idea of putting 
>the last page test in front of the firstpage test, but my first page and 
>lastpage layout are different.

I would expect them to be different, which is why you asked us how to test 
for them.

At 2002-12-04 06:40 -0500, Gilhuijs, Patrick wrote:
>I want a line to be placed at the end of the last page.

Since are talking about page masters, I'm assuming this line is in the 
static content.  If it isn't we are already off on a tangent, and the 
answer is going to be solved in your transformation, not in your formatting.

At 2002-12-04 06:40 -0500, Gilhuijs, Patrick wrote:
>Well, that's not that difficult when using 
>"fo:conditional-page-master-reference". But I have one 
>"fo:conditional-page-master-reference" for the first page too! So, what to 
>do if the first page is also the last page?

My answer is still the same because you haven't given any new information.

I interpret your question to be that you have three page masters: one for a 
multi-page first and subsequent pages (A), one for a multi-page last page 
(B) and one for a single page combination of first/last (C).

This will give you the above:

   <page-sequence-master master-name="frame-pages">
     <repeatable-page-master-alternatives maximum-repeats="1">
       <conditional-page-master-reference page-position="last"
       <conditional-page-master-reference page-position="first"
       <conditional-page-master-reference page-position="last"
       <conditional-page-master-reference page-position="rest"

The formatter will have to deal with the first page first, and chooses 
between "C" and "A".  If it has enough information for more than one page, 
it moves to the next set of alternatives because it has exhausted the 
allowed number of pages of the first set of alternatives.  Perhaps this is 
what you have been overlooking.

I hope this helps.

.................... Ken

Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO:
-                             North America:  Feb 3 - Feb 7,2003

G. Ken Holman               mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.        http://www.CraneSoftwrights.com/f/
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
Next conference training:                    2002-12-08,03-03,06
Received on Thursday, 5 December 2002 07:17:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:27 UTC