xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoffmann, Niels" <n.hoffm...@BGBM.org>
Subject AW: Trying to get correct markers in running page headers
Date Tue, 15 Jul 2008 13:27:29 GMT
Hi Chris,

That totally solved my problem. Thanks a lot!

Best,
Niels 

-----Urspr√ľngliche Nachricht-----
Von: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
Gesendet: Dienstag, 15. Juli 2008 15:01
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Trying to get correct markers in running page headers

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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message