Chapter 4, Exchanging Data Between an External Application
and a Basic XFA Form
XFA Specification
Creating, Updating, and Unloading a Basic XFA Data DOM
120
Other updates by the XFA application carry through to the XML Data DOM. When updating any property
other than
name
, and when deleting, inserting, or moving a node in response to a request from the XFA
application, the XFA Data DOM propagates the update to the XML Data DOM.
Moving a node can cause a name conflict if, for example, a data value containing an attribute (
contains
set to
metadata
) is moved to a location where there is already a peer representing an attribute with the
same name. A similar situation can arise from a request to create a new node. Carrying out such a request
would result in a structure that violates the linkage rules of the XML Data DOM. The XML Data DOM may
refuse to carry out such a request and the XFA Data DOM in response returns an error code to the XFA
application and leaves the XFA Data DOM in a state consistent with the XML Data DOM.
Tree Notation
This specification illustrates the contents of an XFA Data DOM, using the DOM notation described
“Document Object Model Notation” on page x.
This section provides examples that apply this convention
to the XFA Data DOM.
Data groups are expressed in the following form:
[dataGroup (name)]
where
name
represents the
name
property of the data group.
Data values are expressed in the following form:
[dataValue (name) = "value"]
where
name
represents the
name
property of the data value, and
value
represents the
value
property.
The
contains
property of a data value has a value of
data
unless some other value is explicitly shown.
That is, it will only be expressed in this notation when it has a value of
metadata
, as described by the
following two examples:
[dataValue (ISBN) = "15536455"]
In the above example the data value ISBN has a
value
property of
"15536455"
and, although it isn't
explicitly stated by the notation, it also has a
contains
property of
data
.
[dataValue (status) = "stocked" contains="metadata"]
In the above example, the data value
status
has a
value
property of
"stocked"
and a
contains
property of
metadata
.
Similarly, within this specification the
contentType
property of a data value has a value of
the empty
string ("")
when not explicitly shown. Likewise the
isRecord
property of a data group has a value of
false when not explicitly shown.
Indenting is used to show parent-child relationships between nodes. In the following example a data
group named
book
is the parent of a data value named ISBN:
[dataGroup (book)]
[dataValue (ISBN) = "15536455"]
Within a group of sibling nodes, the age relationship is shown by the vertical ordering. The eldest child is
at the top, the youngest at the bottom. In the following example
ISBN
is the eldest child of
book
,
title
is
the middle child, and
author
is the youngest. Between the children of
author
,
firstname
is the older
and
lastname
the younger.