Subject: Re: [xsl] XSL FO keep-together=int Implementation? From: Alex Milowski <alexml@xxxxxxxxxxxx> Date: Sun, 12 Jun 2005 20:12:02 -0700 |
G. Ken Holman wrote: [snip] Thank you for your extensive explanation. I was, however, after more concrete advice. Let's say I have a listing in a block which should be printed on the next page if it fits it, possibly leaving a large space on the current page, but which should just continue on the current page if it doesn't fit completely on the next page. I believe it depends on the processor whether this can be achieved.
In a constraint-based format description vocabulary like FO, you are going to have different output depending on certain algorithm choices. So, page fidelity between FO processors shouldn't be a expected. The major concern is whether they obey the constraints being specified.
Let's say the processor implements a penalty based algorithm similar to Knuth's paragraph filling (which is currently implemented in FOP dev
[*not* the latest FOP release, 0.20.5]). Lets also take a block which
will fill the remaining space on the current page, the next page and a
bit of the page after the next page, for a total of two page breaks.
If the processor decides to start the block on the next page, the block
still fits the next page and the page after the next, also for a total
of two page breaks. Which layout is choosen depends on which penalties
the implementor assigns to "normal" page breaks and to page breaks
caused by "eagerly shifting", and perhaps how much leaving space weights
in. It may be possible to put the block in question in another block
togehter with preceding content and a lower keep precedence for fine
tuning.
I've been mostly concerned with sequential block stacking where I want the page breaks to occur to minimize odd spacing but to obey my keep constraints.
One way out of this is to keep track of "bad placement" of blocks. Beyond some threshold, you might re-place a subsequence of them to try to achieve a better flow of areas.
However, I don't think this is portable, and the FO processor might decide to start a new page anyway once it detects the block wont fit completely onto the current page (as FOP 0.20.5 does).
So the question remains: How do I achieve the layout described above in a processor independent way, using keep precedence levels or whatever, and without guessing in advance whether the content will fit on a page (for assigning different keep precendences in pre-layout stages or whatever)?
Are you asking for the XSL FO example that demonstrates the use case or the algorithm for the use case?
I've been anxious to find implementations of relative keep strength in order to improve the presentation of the annexes of my XSL-FO book, but I haven't seen any yet. I would have liked to help Alex by citing an implementation, but I didn't have anything to contribute to his question.
FOP HEAD is on the way of implementing this. There is still quite a bit to code, so don't hold your breath. A pre-alpha release is planned in two or three months.
Yes it is. I've been watching and playing every time I see a milestone achieved. It would really be good to ensure that keep-together=int isn't in conflict with all the good work happening on FOP.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL FO keep-together=int , J.Pietschmann | Thread | Re: [xsl] XSL FO keep-together=int , J.Pietschmann |
Re: [xsl] XSL FO keep-together=int , J.Pietschmann | Date | [xsl] Re: [exslt] Re: [xsl] Importi, Colin Paul Adams |
Month |