I need to create different nodes for multiple selections in listbox!
For the life of me, I can't figure out how. I read somewhere to use with the xforms:select and deselect events.. but I didn't know where to place them, and the places I tried gave me very weird behaviour.
I am currently implementing the following:
<xf:select ref= "instance('criteria_data')/criteria/criterion" selection= "" appearance= "compact" > <xf:label>Choose criteria</xf:label> <xf:itemset nodeset= "instance('criteria_choices')/choice"> <xf:label ref= "@label"></xf:label> <xf:value ref= "."></xf:value> </xf:itemset> </xf:select>
However when multiple choices are submitted, all selection values are inserted into the same node, separated by spaces.
If AAA and BBB and FFF were selected from listbox, it would result in the following XML:
<criterion>AAA BBB FFF</criterion>
How do I change my code to have each selection be in a separate node?
i.e. I want it to look like this:
<criterion>AAA</criterion> <criterion>BBB</criterion> <criterion>FFF</criterion>