[ 
https://issues.apache.org/jira/browse/FOP-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vincent Hennebert updated FOP-2293:
-----------------------------------

    Attachment: rev11_bug.fo

Hi Seifeddine,

your modifications introduce a regression it seems. See attached rev11_bug.fo 
file. The second variant is shown on page 2 while it should be the first 
variant. I think you can't directly add variants to pendingVariants and that 
you have to keep the bestVariant mechanism.

This should ideally have been caught by the layout tests. That shows that maybe 
more test cases are necessary. Among other things, a test case with several 
multi-switch elements would be great.

Also, before merging to trunk it would be good to do some more clean-up:
* The name BestFitPenalty is making little sense now. Also, that term has a 
very specific meaning in the context of page layout (first fit vs best fit vs 
total fit), so using it may actually be misleading about what we're trying to 
achieve. Something hinting at whitespace management would be better.
* Likewise, the value "best-fit" for the auto-toggle option could have a better 
name. Although it seems that this option is not looked up at all in the code? 
Does MultiSwitchLM implement it by default? This makes it probably not 
compliant with the Recommendation. Remember that, even if partially 
implemented, the default behaviour of those dynamic elements must be compliant.
* It seems that the fitting-strategy option is a left-over from the first 
implementations and is no longer used.
* Possibly other things, that a diff between the branch and the trunk would 
reveal.

It would be great if you could fix those issues before we merge this work to 
trunk.

Thanks,
Vincent

> 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: FO_multi-switch_best-fit_ext_rev10.patch, 
> FO_multi-switch_best-fit_ext_rev11.patch, 
> FO_multi-switch_best-fit_ext_rev2.patch, 
> FO_multi-switch_best-fit_ext_rev3.patch, 
> FO_multi-switch_best-fit_ext_rev4.patch, 
> FO_multi-switch_best-fit_ext_rev5.patch, 
> FO_multi-switch_best-fit_ext_rev6.patch, 
> FO_multi-switch_best-fit_ext_rev7.patch, 
> FO_multi-switch_best-fit_ext_rev8.patch, 
> FO_multi-switch_best-fit_ext_rev9.patch, FO_multi-switch_test.fo, 
> FO_multi-switch_with_best-fit_extension.patch, bestfit.fo, doc.pdf, 
> empty-last-page.fo, multi-switch-testcases.zip, multi-switch_bestfit.fo, 
> multiple-feasible-nodes.fo, patch-rev1.1.patch, patch-rev1.patch, 
> patch-rev2.patch, patch.patch, rev11_bug.fo, two-valid-variants.fo
>
>
> 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
(v6.2#6252)

Reply via email to