You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Vincent Hennebert (JIRA)" <ji...@apache.org> on 2013/10/01 13:15:23 UTC

[jira] [Commented] (FOP-2293) Whitespace management extension

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

Vincent Hennebert commented on FOP-2293:
----------------------------------------

fo:multi-switch's sole purpose is to define a set of possibilities. It doesn't say anything about which possibility should be selected and how. This is left to the fo:multi-toggle element.

By adding some fox:fitting-strategy property to fo:multi-switch, we are moving away from its mere function of listing possibilities, and we are adding selection semantics. I reckon this violates the (spirit of the) Recommendation, that gives one function and only one to an element.

Since we can't use fo:multi-toggle because its semantics diverge too much from our purpose, I think an extension element should be defined. So I would go for Pascal's suggestion 1, amended:
{code:xml}
<fo:multi-switch id="dynamic-content">
  <fo:multi-case starting-state="hide">
    <fo:block>Case 1</fo:block>
  </fo:multi-case>
  <fo:multi-case starting-state="hide">
    <fo:block>Case 2</fo:block>
  </fo:multi-case>
</fo:multi-switch>
<fox:dynamic-content fitting-strategy="best-fit" ref-id="dynamic-content"/>
{code}

I'm open about the element and property names.

> 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
(v6.1#6144)