[ 
https://issues.apache.org/jira/browse/FOP-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834656#comment-13834656
 ] 

Seifeddine Dridi commented on FOP-2293:
---------------------------------------

Hello Vincent,

{quote}
This dynamicNode boolean doesn't seem necessary to me. Why would you prefer a 
node to another just because it corresponds to a multi-switch? It's better to 
rely on the progress made in the Knuth sequence like is done in the default 
implementation.
{quote}
That perplexed me for a while. For instance, if we have 2 possible layouts: one 
where the 1st variant of the dynamic content doesn't fit and another case where 
the 2nd variant fits perfectly. The first possibility should have fewer total 
demerits than the second one. Which one should we choose?

{quote}
findBestFitPenalty: not sure why this method is necessary. If a node contains a 
non-null variant, that necessarily means that the element pointed to by the 
position field is the corresponding BestFitPenalty?
{quote}
Not necessarily. First, because the par member variable is susceptible to 
change, hence invalidating the position field in the Knuth node. Second, there 
is an infinitely stretching glue at the end of the Knuth sequence which makes 
the algorithm create a new finalizing node.

Thanks for your valuable feedback!

> 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_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_test.fo, 
> FO_multi-switch_with_best-fit_extension.patch, bestfit.fo, doc.pdf, 
> multi-switch_bestfit.fo, multiple-feasible-nodes.fo, patch-rev1.1.patch, 
> patch-rev1.patch, patch-rev2.patch, patch.patch, 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.1#6144)

Reply via email to