Chapter 4, Exchanging Data Between an External Application
and a Basic XFA Form
XFA Specification
Basic Data Binding to Produce the XFA Form DOM
161
The Form DOM resulting from this operation represents the binding between data and template. The
relationship between the three DOMs is shown below.
Template
DOM
registration
Form DOM
registration
Data DOM
registration
first
first
“Jack”
last
“Spratt”
apt
“”
street
“99 Candlestick Lane”
city
“London”
country
“UK”
postalcode
“SW1”
first
“Jack”
last
“Spratt”
apt
“”
street
“99 Candlestick Lane”
city
“London”
country
“UK”
postalcode
“SW1”
last
apt
street
city
country
postalcode
Result of binding registration data to registration template
In the above diagram, each node of the Template DOM has acted as a prototype for a node in the Form
DOM (shown by the solid grey lines between them). Each node of the Form DOM has been bound to a
node in the Data DOM (shown by the dotted black lines between them). When a form field node is bound
to a data value node the content of the data node is copied to the form node.
Data Binding Steps
Data binding a simple form such as the one described in the previous section involves the following steps:.
1. Create form nodes as copies of template nodes (“Create
Form Nodes and Match with Data Nodes
(Steps 1 and 2)” on page 162).
2. Match non-attribute data nodes to form nodes.
3. Match attributes to unmatched form nodes (“Match
Attributes (Step 3)” on page 177).
Home Index Bookmark Pages
Pages: Home Index All Pages