Chapter 1, Introduction to XML Forms Architecture (XFA)
XFA Specification
Data Binding: Making the Connection Between XFA Template and Data
22
Data Binding: Making the Connection Between XFA Template and
Data
When an XFA processing application introduces data to an XFA form, it associates each piece of
information to a container, such as a field or a subform. This process is called
data binding.
Generally, XFA data binding attempts to map like-named data values to template fields and data groups to
template subforms. Data and template structures often don't match. XFA processing defines default
binding rules to handle such mismatches. Alternatively, the template designer may choose to provide data
binding rules in the template definition. If those alternative do not provide desired results, the template
designer may change the structure and/or content of the XML data, by specifying XSLT scripts the XFA
processing application uses to pre-process and post-process data. See also
“Basic Data Binding to Produce
the XFA Form DOM” on page 154
and
“Dealing with Data in Different XML Formats” on page 362.
Data binding alters neither the template nor the data. That is, data binding is internal to the XFA
processing application.
Unbound data values and groups (those that don't have matches in the template structure) are preserved
and won't be lost or moved if the data is saved.
The binding operation can create forms with repeated subforms, in which multiple run-time instances of
the subform are created to accommodate the multiple instances present in the data. A form with such a
capability is called a dynamic form.
In addition, XFA data binding is designed to handle like-named data values, as well as like-named data
groups. It is common in forms processing for there to be multiple data values present with the same name.
For example, invoice data generated from a database query could easily have multiple item, description,
unit price and quantity fields in a relatively flat structure. In addition, there may be repeating data groups.
XFA defines default binding rules to ensure that these map intuitively to like-named fields or subforms in
the template. The basic rules for dealing with multiple instances of the same name are:
The relative order of sibling items that have different names is not important, may be ignored and does
not need to be maintained; and
The relative order of sibling items that have the same name is important, must be respected and
maintained
For more information, see
“Basic Data Binding to Produce the XFA Form DOM” on page 154.
Lifecycle of an XFA Form
This section describes the common steps in the lifecycle of an interactive form based on XFA.
Creating an XFA Template
There are several ways a form designer can create a template:
Using a graphical layout tool, such as Adobe LiveCycle® Designer
Automatically by software, a capability provided by SAP® Smart Forms conversion
Hand-edit XFA Template files
Home Index Bookmark Pages
Pages: Home Index All Pages