XFA Specification
Chapter 13, Dealing with Data in Different XML Formats
Extended Mapping Rules
370
</item>
Assume the XFA Configuration DOM has an
attribute
element containing
preserve
. The
xsi:nil
markup causes the empty
desc
element to be loaded as a null value, as described in
“Data Values
Representing Null Data” on page 130.
Nevertheless the null-value node has metadata associated with it.
The result of the mapping is:
[dataGroup (item)]
[dataGroup (book)]
[dataValue (desc) = "" isNull="1"]
[dataValue (language) = "en-US" contains="metadata"]
The excludeNS Element
This specification provides an extended mapping rule to exclude document content from data loader
processing by providing one or more XML namespaces that refer to the content intended for exclusion. By
default, as described in the section
“Namespaces” on page 124,
the data loader excludes content
belonging to a number of predetermined namespaces.
The XFA Configuration DOM may include an
excludeNS
element that overrides the default behavior. See
“Config Specification” on page 676
DOM overrides the default behavior for the entire XML data document.
The content of the
excludeNS
element is a white space separated list of Uniform Resource Identifiers as
described by
[URI].
The data loader excludes elements belonging to any namespace associated with any of
these URIs. The data loader also excludes any attributes belonging to any such namespace. Finally, it
excludes all attributes belonging to any element, which is itself excluded.
Note that a namespace specified with a namespace prefix is not inherited, whereas the default namespace
is inherited. Thus if an element declares a default namespace that is excluded, elements contained within
it are excluded by default. However any of the contained elements may declare a different namespace and
so escape exclusion. When a containing element is excluded but its contained element is included, the
node corresponding to the contained element is appended to the XFA Data DOM at the same point where
the node corresponding to the containing element would have been appended had it not been excluded.
In the example below showing a fragment of an XML data document, the default name prefix is declared
to be
"http://www.example.org/orchard/"
. This is inherited by most elements and their attributes,
however some override the default with the namespace
"http://www.example.org/field/"
, which
is signified by the namespace prefix
field
.
<property xml:lang="en">
<farm xmlns="http://www.example.org/orchard/"
xmlns:field="http://www.example.org/field/">
<tree class="pome">apple</tree>
<tree class="citrus">lemon</tree>
<field:plant class="tuber">potato</field:plant>
<tree field:role="border">poplar</tree>
</farm>
</property>
Assume that the XFA Configuration DOM has been set to load attributes into the XFA Data DOM, as
described in
“The attributes Element” on page 366.
Without the
excludeNS
option, the resulting subtree
of the XFA Data DOM contains:
[dataGroup (property)
[dataGroup (farm) xlmns="http://www.example.org/orchard/"]