xformsmodelsAdded by IBM on August 8, 2013 | Version 1 (Original)
|Contains the XForms model data.
The <xformsmodels> element can have many XForms models, but typically only one model is used in a form because models do not share data or user interface bindings.
This example shows a small XForms data model that contains the name, age, and birth date of a person. The model includes a bind that sets the datatype of <age> to xsd:integer and a bind that sets the datatype of <birthdate> to xsd:date. The model also contains an xforms:submission that uses the HTTP post method to submit the entire instance to a script running on a server.
<xforms:bind nodeset="age" type="xsd:integer"/>
<xforms:bind nodeset="birthdate" type="xsd:date"/>
<xforms:submission id="submitTest" method="post"
- When using an XForms model, you must link the model to the presentation layer of the form. You do this by adding other XForms options to the form, and then using single node and nodeset bindings to create these links.
- If you are including an XForms model in your form, you must declare the XForms namespace. In general, you should declare this on the XFDL node, as shown:
- Each data model can have any number of xforms:submissions. This is useful if you need to submit different data at given times, or if you need to submit the same data to different servers.