Hi,
Unfortunately itemset does not appear to work as you suggest:
xforms-model.xml:
<xforms:model>
<xforms:instance>
<form>
<document>
<vr:Resource>
<vr:content>
<vr:contentLevel/>
</vr:content>
</vr:Resource>
</document>
<data>
<levels>
<level>One</level>
<level>Two</level>
<level>Three</level>
</levels>
</data>
</form>
</xforms:instance>
</xforms:model>xforms-view.xsl:
...
<xforms:group ref="/form/document">
...
<xforms:select ref="vr:Resource/vr:content/vr:contentLevel" appearance="compact">
<xforms:itemset nodeset="/form/data/levels/level">
<xforms:label ref="."/>
<xforms:copy ref="."/>
</xforms:itemset>
</xforms:select>
...
</xforms:group>
...
This displays the list from /form/data/levels/level fine but if I do a multiple select then the instance document still comes out as:
... <vr:content> <vr:contentLevel>One Two Three</vr:contentLevel> </vr:content> ...
instead of:
<vr:content> <vr:contentLevel>One</vr:contentLevel.> <vr:contentLevel>Two</vr;contentLevel> <vr:contentLevel>Three</vr:contentLevel> </vr:content>
Am I doing something wrong?
Cheers,
Matthew
On Dec 26, 2004, at 1:52 PM, Alessandro Vernet wrote:
--- "Matthew J. Graham" <[EMAIL PROTECTED]> wrote:
I have an element <contentLevel> which can take multiple concurrent values, e.g. Research, Development, Scientific. In the view, I use an xforms:select and with a multiple select this produces an instance of: <contentLevel>Research Development Scientific</contentLevel>
Of course, what I really want is: <contentLevel>Research</contentLevel> <contentLevel>Development</contentLevel> <contentLevel>Scientific</contentLevel>
Matthew,
To get this, you would have to use an <xforms:itemset>. When instead of using
an <xforms:itemset> you are listing the label/value pairs in the
<xforms:select>, all the selected values are just stored as a space separated
sequence in the referenced node.
In this case, the specification even mandates this type restriction on the node
the control is bound to: "any simpleContent capable of holding a sequence" (the
restriction is relaxed when using <xforms:itemset>).
Alex
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user
