orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
514 stars 221 forks source link

Implement `xf:copy` element #4438

Open ebruchez opened 4 years ago

ebruchez commented 4 years ago

This would be useful for the workflow UI (#3463).

ebruchez commented 4 years ago

Scenario: checkboxes for the choice of workflow operations, which looks like this:

<accessTo type="array">
    <_ type="NewPage">
        <initialStage type="object">
            <name>initial</name>
        </initialStage>
    </_>
    <_ type="SummaryPage"/>
    <_ type="ViewPage"/>
</accessTo>

What would it take?

ebruchez commented 4 years ago

Question: can it make sense to mix and match xf:value and xf:copy for a same selection control?

XForms 2 says " It can only be used within itemset elements" but that's not a requirement and supporting xf:item would make sense too. In any case, you could have multiple xf:itemset elements so the problem is the same.

XForms 1.1 said that xf:copy must return a single element(). This makes sense. But it could be relaxed.

In a first implementation:

ebruchez commented 4 years ago

XFormsItemUtilsevaluateItemset is not great currently:

And I think there is more. The bottom line is that it's hard to understand.

ebruchez commented 4 years ago
ebruchez commented 4 years ago
ebruchez commented 4 years ago

Some documentation