Hoffmann, Niels wrote:

Dear List,

Hi Niels,


I have been trying to accomplish a rather simple task, but it doesn't seem to 
be possible with FOP.

I need to have a running header and footer on the page that should show the content of a marker in the text. What I want to happen is, to have the last used "headline" in the header and the footer. If the "headline" changes in the flow of a particular page, the footer should differ from the header and show this last used "headline".

I have done with with FOP before, so it is possible.


Right now I use static-content elements and fill them with content from markers, but the problem is, that footer and header never differ. IMHO this is, because the static-content elements are processed before the page is actually written and the "headline" change that sets the marker is only available to the next page.

Am I missing something or do I use the wrong approach?
Is there some kind of a best practice or at least a workaround for this problem?

The key to working with markers is create lots of fo:markers with the flow. The most likely reason for your problems is that you haven't created sufficient fo:markers, so both fo:retrieve-marker end up retrieving the same marker.

The header should look like:

<fo:retrieve-marker retrieve-class-name="heading" retrieve-position="first-starting-within-page" retrieve-boundary="document"/>

with the footer roughly:

<fo:retrieve-marker retrieve-class-name="heading" retrieve-position="last-starting-within-page" retrieve-boundary="document"/>

Then you need to make sure an fo:marker is placed in the flow at least every time the value of heading changes. However, it never hurts to create more markers than are strictly needed if that proves easier within the XSLT.

<snip/>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to