RE: Putting "Please Turn Over" at the bottom of pages in a multi- page document

At 2003-04-15 13:47 +0100, Al-Dhahir, Haitham wrote:
>I implemented the solution using markers displayed below, and this seemed to
>be working. However, this was with two pages only in the flow. I have now
>tested with three pages and am finding an error - I'm using FOP to generate
>PDF, and am getting a NullPointerException.

That is quite obviously a program fault and not anything to do with XSL-FO.

>Could it be perhaps that no instance of the marker is found on page 2? This
>would seem to make sense, as I'm defining the marker at the top (page 1) and
>at the bottom (page 3 in this case) of the flow. Could it be therefore that
>I need to specify a different retrieve-position?

No, the default value for retrieve-boundary looks all the way back to the 
beginning of the page sequence ... so it doesn't matter that the marker is 
not on page two since you are asking for "last-starting-within-page" and it 
goes backwards looking for the closest last.  I mentioned before that the 
usual way to work with markers is to associate a marker with all of the 
content to which the marker applies:

>I believe you are doing it acceptably as well, given what you've written
>above ... though I happen to wrap my marked content with a wrapping block
>in order to associate the marker with all of the content:
>
>     <block>
>       <marker>"continued..."</marker>
>       <block>...</block>
>       <block>...</block>
>       <block>...</block>
>     </block>
>     <block>
>       <marker></marker>
>     </block>
>
>.... but that won't affect your results (it *is* necessary when retrieving
>the last area associated with a marker, but you aren't doing that).  I just
>mimicked what you did above in a test on my machine and I witness the
>results you are looking for.

but for what you are asking for, what you are doing should work.  When you 
fix the NullPointerException in the tool (personally I don't use FOP, so I 
cannot advise how) you will probably fix your problem.

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


--
Upcoming hands-on courses:   Europe (XSLT/XPath):    May  5, 2003
-                            Europe (XSL-FO):        May 16, 2003
- (XSLT/XPath and/or XSL-FO) North America:      June 16-20, 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
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc

Received on Tuesday, 15 April 2003 14:28:04 UTC