Hi,

Andreas Delmelle wrote:
On 19 Nov 2008, at 11:43, Vincent Hennebert wrote:

Georg Datterl wrote:
Hello again,
To keep this thread alive, I tried using break-after. Using break-after="even-page" does what I would have expected from break-before="odd-page", but break-after="odd-page" creates TWO empty pages. Why?

I guess you use FOP version 0.94? I can reproduce that, but starting
from 0.95 no empty page is created at all, even when it should be the
case (break-after="odd-page").

Why would that be a bug? The way I see it, the first block finishes on page 1, which is already an odd page, so the break-condition is satisfied, simply by breaking the page there. No empty page needed.

Interpretation:
break-before="even-page" simply means "the first area generated by this FO should end up on an even page"

Somewhat counter-intuitive, break-after="odd-page" actually means "the first area /after/ the last area generated by this FO should end up on an even(!!!) page"

See section 4.8 of the XSL-FO 1.1 specification [1]:
“A break-after condition depends on the next formatting object in the
flow; the condition is satisfied if either there is no such next
formatting object, or if the first normal area generated and returned by
that formatting object is leading in a context-area.”

So in the present case, there is a next object (the second block), and
the break-after="odd-page" specified on the first block forces that
second block to start on an even page.

[1] http://www.w3.org/TR/xsl11/#keepbreak


OTOH, there does indeed seem to be a slight glitch, in the sense that break-conditions do not appear to be checked across page-sequences.

Take this:

<fo:page-sequence master-reference="contents" initial-page-number="2">
  <fo:flow flow-name="xsl-region-body">
    <fo:block span="all" break-before="even-page" break-after="odd-page">
      [Text]
    </fo:block>
...

Then we get no empty page before, as is expected, since we are already on an even page.

If you add a second fo:block, then you get an empty page in between the two blocks. Again, as expected.

BUT: if you move the same block into a second page-sequence, the empty page disappears again.

This is a bug, unless the term ‘flow’ used in section 4.8 actually
refers to fo:flow. But I don’t believe so.


Vincent

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

Reply via email to