Seifeddine Dridi commented on FOP-2293:

<fo:multi-switch id="dynamic-content">
  <fo:multi-case starting-state="hide">
    <fo:block>Case 1</fo:block>
  <fo:multi-case starting-state="hide">
    <fo:block>Case 2</fo:block>
<fox:dynamic-content fitting-strategy="best-fit" ref-id="dynamic-content"/>

A dangling fox:dynamic-content? I don't think it's a good idea, even 
implementation wise it would be quite cumbersome to deal with. I'm afraid I'm 
more biased toward Glenn proposition. The best-fit extension is more like a 
generalisation of what FO multi-toggle is doing, it can select one or multiple 
FO multi-case depending on the user's fitting strategy. That's why I think it 
must be put inside FO multi-switch, as a property or as a new element we can 
still discuss that if there are more objections.

I have conflicts when I try to apply your patch against the HEAD of the 
Temp_WhitespaceManagement branch. Also, your patch contains many tab characters 
and doesn't compile against Java 1.5 (@Override on methods that implement an 
Sorry about that. I worked on that patch using the latest trunk revision of FOP 
which isn't configured to use Java 1.5.

Would you mind re-creating it against the latest version of the branch and 
fixing those issues?
Never mind, the patch is not supposed to be committed anyway. I shared it 
because I thought maybe we can discuss my initial implementation of FO 
multi-switch, before I move on to adding the best-fit extension.

> Whitespace management extension
> -------------------------------
>                 Key: FOP-2293
>                 URL: https://issues.apache.org/jira/browse/FOP-2293
>             Project: Fop
>          Issue Type: New Feature
>          Components: general
>    Affects Versions: trunk
>            Reporter: Seifeddine Dridi
>            Priority: Minor
>              Labels: XSL-FO
>             Fix For: trunk
>         Attachments: bestfit.fo, doc.pdf, FO_multi-switch.patch, 
> FO_multi-switch_test.fo, multiple-feasible-nodes.fo, multi-switch_bestfit.fo, 
> patch.patch, patch-rev1.1.patch, patch-rev1.patch, patch-rev2.patch
> I have been working on an extension for whitespace management, similar to 
> what's described here: 
> http://wiki.apache.org/xmlgraphics-fop/WhitespaceManagement
> The logic of the extension is very simple: the user defines a set of 
> alternatives that he wishes to insert at the end of a page, then if there is 
> enough space left, FOP will pick the alternative that best matches the user's 
> selection criteria (first fit, smallest fit, biggest fit).
> This is my first work on FOP and it took me almost 2 months to reach this 
> stage in development. But it's not the end of course, so I'm relying on your 
> feedback to improve it.
> Thank you

This message was sent by Atlassian JIRA

Reply via email to