Well, I managed to figure it out myself, but i still got one more problem, this time a more simple question.
Is it possible to get a working page-number-citation (or something that looks like that) of a real fo-"blank" page?
If not, I use break-before="even-page" on an fo:block and then print something. Is there a way to only print something, ONLY if it had to do the break?
More detailed:
My problem is that when a page-sequence ends on an odd page - and no empty page has to be added - two extra empty pages are added instead of none. I think I understand why that is, but I can't really work around it right now.
Right now, I'm creating a marker at the end of each page-sequence (which is then in turn on the last, real page) and a block with a break-before and an ID. That ID then lands either on the blank page (which is weird, but what I want) or on another page some time later (which is my problem).
Luckily, when having an odd page and I need that output, the ID really does land on the blank page. So if there really was a blank page added/needed (because the page-sequence ended on an even page), it now has an ID that I can reference to.
But on even last content pages, ie. where the marker+block+pagebreak isn't even needed, this creates two additional and useless empty pages. The ID lands on the second empty page.
If I wouldn't print the nbsp, the extra pages won't get printed, but the ID-blocks are moved to the next page-sequence and the page-number-citation shows mostly "1" (which is correct, but... yea... kinda useless)
For reference, that's my code right now:
At the end of each page-sequence:
Code:
<fo:marker marker-class-name="emptymarker{generate-id()}"><fo:inline>/<fo:page-number-citation ref-id="empty{generate-id()}"/></fo:inline></fo:marker>
<fo:block span="all" break-before="even-page" id="empty{generate-id()}"> </fo:block>
In the footer of odd pages:
Code:
<fo:retrieve-marker retrieve-class-name="emptymarker{generate-id()}" retrieve-boundary="page-sequence"/>
So all in all, I know why this isn't working properly - but still, this would work if I wouldn't need the block after the marker and instead use an ID block that's already on the (possible, but not mandatory) following blank/empty page, like a unique one in a static content.
That's of course most of the time not really practical. And getting some content on a, well, content-less (blank) page sounds kind of insane, too.
Any ideas? Thanks!
PS: The output on the last few pages would look like this right now:
... 47, 48, 49/50, <empty no output>, 1, 2, ... ---- correct
... 31, 32/34, <empty>, <empty>, 1, 2, .... ---- wrong, don't need 2 empty pages. the /34 is only printed for debug purposes, because it's on a even page footer, not an odd one.