XFA Specification
Chapter 19, Data Description Specification
Data Description Element Reference
753
The result is almost the same as the previous example using ordered, but more forgiving. Any data
document that matches the previous example will also match this data description. In addition, this data
description also matches data documents in which the order of the “streetNumber”, “streetName”, “city”,
and “postalCode” elements is switched around. However they are all still required to be present. Hence the
following fragment of data is valid:
<address>
<city/>
<streetName>Main Street</streetName>
<postalCode/>
<streetNumber>47</streetNumber>
</address>
The following fragment illustrates the effect of combining unordered with one or more children having
dd:minOccur
set to a value of 0. Any element with
dd:minOccur
set to a value of 0 is optional. Consider
the following fragment:
<address dd:model="unordered">
<streetNumber/>
<streetName/>
<city dd:minOccurs="0"/>
<postalCode dd:minOccurs="0"/>
</address>
Given the above data declaration fragment, the following data fragment is valid:
<address>
<streetName>Main Street</streetName>
<streetNumber>47</streetNumber>
</address>
dd:nullType Attribute
This attribute controls the mapping between data elements and null nodes in a DOM. A null node is
distinct from a node with content of the empty string. A null node has no value at all – it is null in the
database sense. The base XML 1.0 standard [XML1.0] does not provide a standard way to represent null
nodes. Sometimes an empty element is represented internally as a null node, but other times it is
represented as a normal node with a value of the empty string. XML Schema [XMLSchema] defines a
syntax using the namespaced attribute
xsi:nil
. The
dd:nullType
attribute specifies which method is
used for this element and, unless overridden, inherited its descendants.
The value of the attribute must be one of the following:
empty
On output null nodes are represented by empty elements. On input empty elements are mapped
to null nodes, as are elements marked as null using
xsi:nil="true"
. This is the default.
exclude
On output null nodes are excluded from the XML document. On input elements marked as null
using
xsi:nil="true"
are mapped to null nodes. Elements that are empty but not marked
using
xsi:nil="true"
are mapped to regular nodes with values of the empty string.
Note:
When the element has
dd:nullType
set to exclude it must also have a
dd:minOccur
attribute
set to 0. Failure to uphold this rule would lead to a schema violation when the node was null
because
dd:nullType
would require that the element be omitted and at the same time
dd:minOccur
would require that it be included.
Home Index Bookmark Pages
Pages: Home Index All Pages