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: Wed, 04 Dec 2002 07:33:20 -0500
Message-Id: <5.2.0.9.0.20021204073059.030a8308@pop.storm.ca>
To: <www-xsl-fo@w3.org>

At 2002-12-04 06:40 -0500, Gilhuijs, Patrick wrote:
>I want a line to be placed at the end of the last page. 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? The line will not 
>show up on the page, cause the conditional page master for the first-page 
>will be applied. So how can I let the line show up also if the first page 
>is the last page at the same time?

By ordering your conditional page masters to first test for the last page 
and then after that test for the first page.

If your document is only one page long, it will satisfy the first test 
before looking at the second test.

Right now you are probably ordering your first page as your first test and 
last page as your second test, and the formatter is choosing first page 
because it is the first of the conditionals satisfying the condition of 
being both the first and last page.

This is a frequently-encountered problem with new users of XSL-FO.

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 Wednesday, 4 December 2002 07:33:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:10 GMT