XFA Specification
Chapter 13, Dealing with Data in Different XML Formats
Extended Mapping Rules
383
Bind pictures may be supplied by the template; however, if a particular field definition in the template
does not supply a bind picture clause, the data binding process looks for a default bind picture clause
supplied in the XFA configuration document. If a default clause is supplied, the data binding processor
uses it. In either case, the
rawValue
property of the field is set to the supplied value (in the example
"€439,02"
) and the
value
property is set to the canonical string (in the example
"439.02"
). If there is
no default clause, both properties are set to the supplied value.
The default picture clause is specified using a
picture
element. The
picture
element must be the child
of a
transform
element. The example default picture clause could be declared as follows:
<transform ref="prix">
<picture>$999.99</picture>
</transform>
In this case, since the value of the
ref
attribute is
prix
, the default picture clause applies only to data
elements named
prix
, after any renaming imposed by other extended mapping rules. As always with
picture clauses, if the data does not match the picture clause the picture clause has no effect. For example
if the data was
"gratis"
both the
rawValue
and
value
properties of the field would be set to
"gratis"
. For more information about picture clauses see
“Picture Clause Specification” on page 901.
For an introduction to localization and canonicalization, see
“Localization and Canonicalization” on
page 140.
The presence Element
This section describes an extended mapping rule that can be used to flatten or remove parts of the
hierarchy of data in the XFA Data DOM and optionally the XML data DOM.
The XFA Configuration DOM may include one or more
transform
elements, each of which may contain a
presence
element that overrides the default behavior. See
“Config Specification” on page 676
for the full
schema. The behavior specified by the
presence
element overrides the default behavior within the
scope described for each keyword below.
The content of the
presence
element must be one of the keywords described below:
presence value
preserve
ignore
Directs the data loader to …
Preserves the original hierarchy.
Removes the node matching the
ref
property and also its descendents from
the XFA Data DOM but not from the XML data DOM, unless the node is the
root node in which case the original hierarchy is preserved.
Removes the
dataGroup
node matching the
ref
property from the XFA and
XML data DOMs, promoting its immediate children to children of its parent,
unless the node is the root node in which case it is preserved. Descendents are
not affected by this operation.
Removes all
dataGroup
nodes that are descendants of the node matching
the
ref
property from the XFA and XML data DOMs. The matching node itself
is not removed. All
dataValue
nodes that are descendants of the node are
promoted to children of the node.
dissolve
dissolveStructure
Invoking the extended mapping rule with
preserve
produces the same results as the default mapping
behavior for element names as described in
“About the XFA Data DOM” on page 114.
Home Index Bookmark Pages
Pages: Home Index All Pages