Incorrect context for xf:outputs that are in xf:labels in an xf:itemset that is on an xf:select1 with @appearance="full"

Mark Birbeck's picture
Project:formsPlayer
Version:1.5.2
Component:Code
Category:bug
Priority:normal
Assigned:Unassigned
Status:active
Description

xf:itemset can be used with xf:select1 to specify a list of choices that originate from the instance data. Typical usage is like this:

<xf:select1 ref="a" appearance="full">
  <xf:label>Select</xf:label>
  <xf:itemset nodeset="../b">
    <xf:label ref="." />
    <xf:value value="." />
  </xf:itemset>
</xf:select1>

But it's also possible to place xf:output controls in the label, to create more complex output:

<xf:select1 ref="a" appearance="full">
  <xf:label>Select</xf:label>
  <xf:itemset nodeset="../b">
    <xf:label>
      <xf:output ref="." />
    </xf:label>
    <xf:value value="." />
  </xf:itemset>
</xf:select1>

Currently, the evaluation context of the xf:label is the evaluation of the control itself (in this case a) rather than the node indicated by the iterator. Sample code is available in test 2 in the select1 itemset test.