XFA Specification
Chapter 13, Dealing with Data in Different XML Formats
Extended Mapping Rules
365
Each
transform
element must include at least one operation (child element). There must not be more
than one child element of the same name within a single
transform
element.
The data loader does not apply these transformations to any part of the XML data document above the
start element, as described in
“The startNode Element” on page 394.
Likewise it does not apply these
transformations to any part of the XFA Data DOM representing parts of the XML data document above the
start element. Also, it does not apply these transformations to any part of the XML data document
excluded from loading by the namespace rules
except
when carrying out a
remove
directive. When
carrying out a
remove
, all descendents of the node to be removed from the XML DOM are also removed,
regardless of namespace.
The data loader applies these transformations in the order shown in the table in Extended Mapping Rules.
The
ignore
keyword has an effect both when data is loaded into the XFA Data DOM and when it is
unloaded into an XML data document. The other transforms only have effects when loading.
It is not recommended for a single XFA Configuration DOM to contain multiple
transform
elements with
the same value for
ref
. However if this does happen the data loader selects the highest-precedence
transformation of the type currently being processed for a particular data element as shown by the
following table. In the table higher precedence is indicated by a higher number.
Transform
presence
Precedence
3
2
1
0
Option
dissolveStructure
dissolve
ignore
preserve
normalize
trim
ltrim, rtrim
preserve
remove
ignore
dataGroup, dataValue
whitespace
3
2
1
0
ifEmpty
2
1
0
The table has no entries for the other transforms because they do not prioritize. Instead when there are
conflicting transforms, the data loader uses the one that comes last in the configuration document.
Similarly when different transforms have the same type and precedence (for example
ltrim
and
rtrim
)
the data loader uses whichever comes last in the configuration document.
For example, if the XFA configuration document contains:
<transform ref="book">
<rename>pamphlet</rename>
<presence>dissolve</presence>
<whitespace>trim<whitespace>
</transform>