The value element

Release 2.0 - ...

This element provides a storage value to be used when an item is selected.

The storage value is determined by one of three methods, in order of precedence:

  • The value of a node indicated by a Single Node Binding expression, if specified.
  • The result of evaluating an XPath expression appearing in attribute value, if specified.
  • The inline content of the value element (when neither the Single Node Binding nor the value attribute are expressed).

 

Example

XML CopyCode image Copy Code
<xforms:itemset nodeset="/carsAvailable/car">
   <xforms:label ref="."></xforms:label>
   <xforms:value ref="."></xforms:value>
</xforms:itemset>

Attributes

Name Required / optional Description
value optional An XPath expression to be evaluated. The string result of the evaluation is used as the storage value of the item when it is selected.
Common Attributes optional Any attribute from the Common Attributes collection (e.g. id).
Single Node Binding Attributes optional One or more attributes from the Single Node Binding Attributes group (ref, model, bind).

Content

This element only allows inline text content, no child elements.

Specification

Link to the XForms specification: the value element.