104 IBM Workplace Forms: Guide to building and integrating a sample Workplace Forms application
򐂰 Bindings:
Each data instance has associated bindings. Bindings tie one element in the data instance
to one or more elements in the form description. For example, if a form had a firstName
field on both the first and second pages, you might bind the firstName element in your data
instance to both fields. Once this is done, all three elements will share data, meaning that
if one element is changed the other two elements are updated to mirror that change.
򐂰 Submission rules:
Each data instance may have an associated set of submission rules. These rules control
how a data instance is transmitted when it is submitted for processing. This is an optional
feature, and is only necessary when you want to submit the data instance by itself, without
the rest of the form. There are many cases in which you may want to submit the entire
form, and then retrieve the data instance from the form during processing. This is
particularly true when you are using signatures on your forms.
4.7.1 Creating an XML Data Model
When creating an XML Data Model, it is a good idea to create your data instances one at a
time, and to set up the bindings and submission rules for that instance before moving on to
the next data instance.
To create an XML Data Model, you must:
򐂰 Declare the XML Data Model in the form.
򐂰 Create a data instance.
򐂰 Bind the elements of the data instance.
򐂰 Set up submission rules for the instance (optional).
򐂰 Create a submission button for the instance (optional).
The data model is always declared as an option in the global item of a form’s global page, and
begins with the <xmlmodel> tag. Each data instance is inserted within an <instances> tag in
the XML model. Essentially, the XML Data Model is a block of XML that is placed at the
beginning of a form, within the global page’s global item, as shown in Example 4-4.
Example 4-4 Example of the XML Data Model
<globalpage sid="global">
<global sid="global">
<xforms:instance xmlns="" id="FormOrgData">

Get IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.