[xep-support] Re: Links to repeating headers

G. Ken Holman gkholman at CraneSoftwrights.com
Wed Oct 19 04:15:37 PDT 2011


At 2011-10-19 10:33 +0200, =?iso-8859-2?Q?Jan_To=B9ovsk=FD?= wrote:
>is there any general rule which PDF page should be displayed if the 
>link points to the ID in a repeating header?

As I understand it, the resulting area tree is not allowed to have 
multiple occurrences of a single anchor ID value.  If you put it 
explicitly in static content then it will be repeated in the area 
tree triggering the error condition.

>I would expect the link to the first occurrence. But the PDF 
>processed with XEP points to the last one. Is it correct?

Since you have an error condition in play, there is no "correct" 
place to put it.  Either first or last is wrong, but it isn't the 
fault of the engine, it is the fault of the XSL-FO being ambiguous.

>Placing that ID directly into the body area at the beginning of the 
>flow has the following shortcoming. In some display settings the 
>correct page is displayed, but it is scrolled a bit so the repeating 
>header is hidden what can confuse users...

I usually avoid this in the reader by setting the zoom to the entire 
page size.  But I understand if readers want it to be bigger.

>Is there any solution for this?

Have you tried using a marker?  In your static content retrieve a 
marker of a given name.  At the start of your body flow, define the 
marker to include the anchor, then immediate define the marker to be 
empty.  That defined marker will be retrieved only once, it will be 
on the first page of your page sequence, and subsequent pages will 
retrieve the empty definition.  Your area tree will then not be in 
error because there will be only one ID in the tree.  Then it doesn't 
matter if the formatter goes to the first or the last, because there 
is only one.

I hope this helps.

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


--
Contact us for world-wide XML consulting and instructor-led training
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/f/
G. Ken Holman                   mailto:gkholman at CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


!DSPAM:87,4e9eb92c63731951570684!




More information about the Xep-support mailing list