XFA Specification
Chapter 13, Dealing with Data in Different XML Formats
Extended Mapping Rules
395
</order>
Assume that the start node has been set with
"xfasom(order.item[1].book)"
. Recall that XFA
SOM expressions use zero-based indexing, so
"item[1]"
refers to the
second
instance of
item
. The result
of the mapping is as follows:
[dataGroup (book)]
[dataValue (ISBN) = "15536456"]
[dataValue (title) = "XML Power"]
[dataGroup (author)]
[dataValue (firstname) = "John"]
[dataValue (lastname) = "Smith"]
[dataValue (quantity) = "2"]
[dataValue (unitprice) = "30.00"]
[dataValue (discount) = ".40"]
With a start element expressed as
"xfasom(order.item)"
, the result of the mapping is as follows:
[dataGroup (item)]
[dataGroup (book)]
[dataValue (ISBN) = "15536455"]
[dataValue (title) = "Introduction to XML"]
[dataGroup (author)]
[dataValue (firstname) = "Charles"]
[dataValue (lastname) = "Porter"]
[dataValue (quantity) = "1"]
[dataValue (unitprice) = "25.00"]
[dataValue (discount) = ".40"]
It should be noted that an identical mapping is produced with a start element expressed as
"xfasom(order.item[0])"
.
With a start element expressed as
"xfasom(order.item[1])"
, the result of the mapping is as
follows:
[dataGroup (item)]
[dataGroup (book)]
[dataValue (ISBN) = "15536456"]
[dataValue (title) = "XML Power"]
[dataGroup (author)]
[dataValue (firstname) = "John"]
[dataValue (lastname) = "Smith"]
[dataValue (quantity) = "2"]
[dataValue (unitprice) = "30.00"]
[dataValue (discount) = ".40"]
The whitespace Element
This section describes an extended mapping rule that can be used to alter the handling of white space in
the XML data document. This handling affects the XFA Data DOM and also the XML data DOM.
By default, as described in
“White Space Handling” on page 133,
white space is preserved in the
value
property of
dataValue
nodes. This extended mapping rule provides for alternate behaviors in which
white space is trimmed from both ends, trimmed only on the left, trimmed only on the right, or
normalized. Note that both element content and attribute values are represented by
dataValue
nodes,
so this operation applies equally to both.
Home Index Bookmark Pages
Pages: Home Index All Pages