Using the bind attribute to create a single node bindingAdded by IBM on October 10, 2012 | Version 1 (Original)
When you use the bind attribute to create a single node binding, you are creating an indirect link between a display element in the form, such as a field, to a data element in the XForms model. To do this, you link the element in the form to a <bind> element in the data model using that element's ID. This linking is then automatically extended to the data element that the <bind> affects.
For example, consider the following data model:
In this case, the <a> and <b> elements hold the length of the sides of a triangle. The <bind> element then calculates the hypotenuse and sets that value in the <c> element. You might link an xforms:input to this bind, as shown:
<xforms:bind id="hypotenuse" nodeset="c">
<xforms:bind calculate="power(../a * ../a + ../b * ../b, 0.5)"/>
In this case, the xforms:input is linked to the identified bind, which in turn link the xforms:input to the <c> element in the data instance. This means that the field and the <c> element would share data.
Nested Binds When creating a single node binding, you cannot link to nested binds. You can only link to the outermost bind in any nested structure.
Inheritance single node bindings that are created using the bind attribute do not inherit starting locations from other single node bindings (unlike single node bindings created using the ref attribute).