Thanks for the explanation.

I've been working with the problem for quite some time now and the example i gave was just a simulation of how the original project would come out. In the original project though, i have no control over the page breaks, is there any way for me the make sure i can avoid the situation that you stated below (wherein the page breaks precisely between the first and second section)? Would using a keep-with property do the trick?

Regards,
*Jeff Sese*

Andreas L Delmelle wrote:
On Feb 15, 2007, at 04:54, Jeff Sese wrote:

Hi,

I tested some variations of the position of the markers and the properties i used for the retrieve-marker, i finally got my desired output. Here's my fo code for reference:
<snip />
Basically, I placed a marker that can be read when i specified a page-boundary of page-sequence. These were place as the first child of the parent block of the article and the first child of the last block of the article. Then I placed a marker for the separator and the title of the current article in the first block child of the main block, so that it can only be read by a page-boundary of page (I hope my understanding of the page-boundary property was correct).

Yep, seems about right. Just FYI, to see if you understood it correctly, I'll try to explain a bit more...

The retrieve-boundary property has an initial value of "page-sequence" (= specifying that value is the same as omitting the entire property specification). That value means that *only* markers within the same page-sequence as the retrieve-marker are qualified for retrieval. Setting this to "page" means that any marker that is retrieved, MUST be on the containing page (~ same page as the retrieve-marker). So, this property only makes a difference if a given page (or page-sequence) does /not/ contain a marker of the specified marker-class-name: * with a retrieve-boundary of "document", even a marker from a page in a preceding page-sequence may be retrieved * with a retrieve-boundary of "page-sequence", a marker from a preceding page within the same page-sequence may be retrieved * with a retrieve-boundary of "page", there would be no marker to retrieve

Note that markers on pages /following/ the containing page are /never/ qualified for retrieval, whether or not they're in the same page-sequence.

The retrieve-position property, OTOH, indicates a preference for which marker will be retrieved if there's more than one that qualifies based on the retrieve-boundary.

In your example:
1) the first page will contain only one marker, namely one of marker-class-name="heading-in-page-sequence", so that one will be retrieved. The other two retrieve-markers retrieve nothing. Due to retrieve-boundary="page", only markers on the containing page qualify.
2) the second page contains four markers:
* two of marker-class-name="heading-in-page-sequence", so the one that satisfies the preference "first-starting-within-page" is retrieved * one of marker-class-name="heading-separator", so that one is retrieved
  * one of marker-class-name="heading", so that one is retrieved
3) the third page contains four markers: analogous to the second
4) the fourth page contains no markers, so only retrieve-markers with a retrieve-boundary other than "page" will actually retrieve anything

Only thing to take care of: in this case, all works nicely, since you control the page-breaks (break-after="page"). Using implicit, formatter-generated page-breaks would make things slightly more difficult. If you remove the first explicit break-after, and the formatter would decide to break precisely between the first and second section, your output could turn out to look like:

page 1: first heading
...
page 2: second heading - second heading
...

Anyway, thanks for sharing your solution with the list! Always nice to have examples in the archives somewhere.


HTH!

Cheers,

Andreas


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



--No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.39/687 - Release Date: 2/14/2007 4:17 PM



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

Reply via email to