xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Xmlgraphics-fop Wiki] Update of "WhitespaceManagement" by JeremiasMaerki
Date Wed, 07 Feb 2007 16:38:29 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The following page has been changed by JeremiasMaerki:

The comment on the change is:
Some thoughts...

  When the Renderer encounters a fox:best-fit element it analyses the available space in BPD
within the current page and selects the alternative which fits "best" within the remaining
BPD. By best fit, I mean the BPD of the alternative is less than remaining BPD but more than
the BPD of all other alternatives which are less than the remaining BPD.
+ == Questions ==
+  * I know that in this particular requirement such an alternative block will not be broken
across pages. But since the XSL working group has it on their requirements list, is it thinkable
that those block need to be broken across pages?
+  * Are there better suited names for the new elements?
+    * fox:best-fit-block and fox:best-fit-alternative perhaps? "alternative" seems somewhat
too generic. "best-fit-block" stresses that this is about block-progression-direction only.
+ == Thoughts for a possible implementation ==
+ First thought is to implement it similarly to a block-container with stretch and shrink.
The implementation could measure the min/opt/max of every alternative and could calculate
a combined min/opt/max from that. Creating Knuth elements for this combined min/opt/max is
easy (a single box plus glue for the whole best-fit block with no break opportunity in between).
After the page breaking, generating the contents of a particular alternative is easy and can
be done the same way as for block-container.
+ What's critical is the optimum BPD for the whole block. Assuming you are creating a catalog
with each article starting with the same larger structure. After that you have some variable
length content. Since the first block always takes some space you will want to keep it together.
This can lead to larger white areas on a page after the end of an article. You may be able
to fill that with additional content, an additional picture perhaps. But that should only
happen if there's really room to waste. So in this case the optimum value is 0pt. Maybe each
alternative would have to have an id attribute and the best-fit block will contain a reference
to the preferred alternative. The preferred alternative's optimum height will then become
the best-fit block's optimum height. In the case where you don't want any additional content
in the normal case, you'd specify an empty alternative and assign its id to the best-fit block.

To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org

View raw message