Node-Set Binding Attributes

Release 2.0 - ...

The following attributes define a binding between an XForms element such as a form control or an action and a node-set defined by the XPath expression.

When an XForms element is declared to have a Node-Set Binding, then one of the attributes listed below is required (unless the element explicitly states that the Node-Set Binding is optional).

nodeset

Binding expression interpreted as XPath. This attribute has no meaning when a bind attribute is present.

In the example below, the instance data nodes people/person are used as repeat collection within the repeat element.

Example

XML CopyCode image Copy Code
<xforms:repeat nodeset="people/person">
   <xforms:output value="concat(./name , ' ')" />
</xforms:repeat>

model

Author-optional XForms model selector. Specifies the ID of an XForms model to be associated with this binding element. This attribute has no meaning when a bind attribute is present.

In the example below, the instance data nodes events/event from the model event_model are used as repeat collection within the repeat element.

Example

XML CopyCode image Copy Code
<xforms:repeat model="event_model" nodeset="/events/event">
   <xforms:output ref="." />
</xforms:repeat>

bind

Author optional reference to a bind element.

In the example below, the itemset element is bound to the nodes which are selected by the nodeset attribute of the bind element with ID bind_car

Example

XML CopyCode image Copy Code
<xforms:itemset bind="bind_car">
   <xforms:label ref="."></xforms:label>
   <xforms:value ref="."></xforms:value>
</xforms:itemset>

 

Specification

Link to the XForms specification: Node-Set Binding Attributes.