Revisiting this question:
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. The desired output is a
"Continued..." at the bottom of pages 1 and 2, but not page 3.
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?
I'm guessing though - the trouble is, I don't have a complete understanding
of how the below solution is supposed to work, or what the various different
retrieve positions (e.g. "last-starting-within-page",
"first-including-carryover" etc) actually mean. I can't understand what the
descriptions of these terms on the W3C site mean in a practical sense - can
anyone clarify or point me towards a helpful website?
Thanks,
Haitham.
-----Original Message-----
From: G. Ken Holman [mailto:gkholman@cranesoftwrights.com]
Sent: 09 April 2003 20:17
To: 'www-xsl-fo@w3.org'
Subject: RE: Putting "Please Turn Over" at the bottom of pages in a mult
i- page document
At 2003-04-09 19:02 +0100, Al-Dhahir, Haitham wrote:
>I tried using the first approach, with markers, and unfortunately cannot
get
>it to work - yet! The reason I thought my situation required the second
>solution is that in your answer you qualify the first solution with "(when
>you are not generating separate page sequences)" and the second solution
>with "(when you are generating separate page sequences)". I assumed this
was
>referring to multiple page sequences - can you explain further please?
Sorry, I only meant that the first was necessary when not generating
separate page sequences ... my poor wording did not indicate that it could
also be used (i.e. either could be used) when you are generating page
sequences.
>Now I have the following:
>
>- A static-content which should appear in the region-after of each page
>- This static-content references a marker called "continued" like so:
>
><fo:retrieve-marker retrieve-class-name="continued"
>retrieve-position="last-starting-within-page"/>
>
>- I have defined the marker at the very top of the flow like so:
>
><fo:flow flow-name="xsl-region-body">
>
> <fo:block><fo:marker
>marker-class-name="continued"><fo:block>Continued...</fo:block></fo:marker>
<
>/fo:block>
>...
>...
>
>- And a marker at the very end of the flow like so:
>
>...
>...
> <fo:block><fo:marker marker-class-name="continued"/></fo:block>
>
></fo:flow>
>
>Unfortunately nothing appears at the bottom of any of the pages.
Ouch! It looks right to me.
>I have put
>some dummy text in the static content and this appears fine - so it does
>seem to be a problem with my definition/usage of the markers.
>
>I believe I am implementing the solution you describe on the Yahoo list,
>however is there anything obviously wrong with what I'm doing?
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.
Have you confirmed that *any* marker retrieval of any kind is working in
the formatter you are using? If you aren't seeing anything on any page,
then I would question the functioning of markers and I would try a separate
test of a simple FO instance.
Sorry I can't shed any light on the 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