XFA Specification
Chapter 13, Dealing with Data in Different XML Formats
Extended Mapping Rules
364
remove
remove
in every case causes the data loader to omit content from the XFA Data DOM and also
remove it from the XML data DOM. If a subsequent unload operation is done, the data unloader
produces a document without the removed content.
Other keywords and their meanings are defined under the extended mapping rule in which they are used.
Document Range
The term
document
range refers to the extent of the XML data document that is processed by the data
loader, such as the whole XML data document or a fragment, as previously described in the section
“Default Data Mapping Rules” on page 121.
Some extended mapping rules affect the position and extent of the document range. The set of elements
associated with these rules consists of
startNode
,
record
,
incrementalLoad
, and
window
.
Transforms
Some of the extended mapping rules are known collectively as
transforms.
The elements that invoke these
rules are only valid inside a
transform
element, as specified by the XFA configuration schema
“Config
Specification” on page 676.
The set of elements associated with transforms consists of
presence
,
whitespace
,
ifEmpty
,
nameAttr
,
rename
and
groupParent
.
The XFA Configuration DOM may include one or more
transform
elements. Each
transform
element
has a
ref
attribute. The value of the
ref
attribute determines where the mapping is applied. The value is
a list of one or more names, where each name is either an element tag or
"*"
. The
transform
element
applies to all data elements with tags that match any of the names in its list.
"*"
is a special pattern that
matches all tags. The transform also matches all tags if the value of its ref attribute is an empty string (
""
).
The set of data element tags that match a particular
transform
element is referred to here as the
transform set
for that element.
The data loader applies the mapping to elements whose names match (case-sensitive) the value of the
ref
attribute or, if the value of the
ref
attribute is the empty string (
""
), to the entire document. Some
transforms apply to all content of the matched element, including sub-elements, whereas other
transforms apply only to the element itself and its character data. The scoping in each case is natural to the
type of transform. For example, white space trimming transforms, when applied to data values, affect all of
the descendants of the
dataValue
node containing data (as opposed to metadata), whereas renaming
affects only the node corresponding to the nominated element or attribute itself. However, an element
mapped by one
transform
may include an element mapped by the same or a different
transform
. The
data loader responds to such nesting by applying the specified transforms sequentially in a depth-first
manner. For example, if the transform for an outer element says it is to be discarded but the transform for
an inner element says it is to be preserved, the inner element is at first preserved (by its own transform) but
then discarded along with the other descendents of the outer element.
Some transforms change the name of the node in the XFA Data DOM that corresponds to the element.
These do not affect which later transforms will be applied to the node. Processing is controlled by the
original element tag, not the name of the node in the XFA Data DOM.
Note:
The value of
ref
must be a simple node name. Readers who are familiar with XFA SOM expressions
might assume that SOM expression syntax is valid here, but it is not. As a consequence of this
restriction, the transforms within the
transform
element apply to every node in the document
range with a matching name and appropriate type, regardless of the node's position in the tree.