Re: Wildcard in the <value> element

Hi Alessandro,

Alessandro Triglia wrote:

> As for <itemset>, it is unclear to me how <value> can be used within an <itemset>, given that a <value> would provide a single value and not a nodeset.   The specification of the <itemset> element describes the use of the <copy> element but not the use of the <value> element.

Since xf:value allows for single node binding, you could use value with 
an itemset by making its value relevant to the nodeset.  For example:

If I had instance data:
<persons>
   <person>
     <name>Bob Smith</name>
     <ssn>123-45-6789</ssn>
   </person>
   <person>
     <name>Mary Smith</name>
     <ssn>987-65-4321</ssn>
   </person>
   <selectedPerson/>
</persons>

<xf:select ref="selectedPerson">
   <xf:itemset nodeset="persons/person">
     <xf:label ref="name"/>
     <xf:value ref="ssn"/>
   </xf:itemset>
</xf:select>

So this would effectively create two items:
<xf:item>
   <xf:label>Bob Smith</xf:label>
   <xf:value>123-45-6789</xf:value>
</xf:item>
<xf:item>
   <xf:label>Mary Smith</xf:label>
   <xf:value>987-65-4321</xf:value>
</xf:item>

> 
> So my question is, in what cases (if any) would a <value> element contain a child element?
> 

I can't think of an example of this off of the top of my head.

--Aaron

Received on Friday, 21 July 2006 20:11:21 UTC