Chapter 4, Exchanging Data Between an External Application
and a Basic XFA Form
XFA Specification
Creating, Updating, and Unloading a Basic XFA Data DOM
128
In the above example the elements
ISBN
and
title
enclose character data. All such elements within the
document range map to
dataValue
nodes with a
name
property corresponding to the local part of the
element type (the name given in the element's start and end tags), and a
value
property corresponding
to the element content. The result of the mapping is as follows:
[dataGroup (book)]
[dataValue (ISBN) = "15536455"]
[dataValue (title) = "Introduction to XML"]
The rules for mapping content of the XML data document into
dataValue
nodes are defined in the
following sections:
Data Values Containing Character Data
For elements within the document range enclosing purely character data, the data loader maps each
element into a
dataValue
node as specified:
the
name
property of the
dataValue
node is set to the local part of the element type (tag name) of
the element
the
value
property of the
dataValue
node is set to the character data of the element
the
contains
property of the
dataValue
node is set to
data
the
isNull
property of the
dataValue
node is set to 0
This behavior is illustrated by the previous example.
Data Values Containing Mixed Content
For elements within the document range enclosing mixed content, the data loader maps each element
into
dataValue
nodes as specified:
the
name
property of the
dataValue
node is set to the local part of the element type (tag name) of
the element
the
value
property of the
dataValue
node is set to the ordered concatenation of all of its child
dataValue
node's
value
properties, excluding children that contain metadata (see
“Attributes” on
page 133
for more information about the
contains
property)
the
isNull
property of the
dataValue
node is set to 0
In addition, each enclosed unit of character data within the element maps to a
dataValue
node with a
name
property of an empty string, a
value
property corresponding to the unit of character data, a
contains
property of
data
, and an
isNull
property of
0
.
dataValue
nodes created according to this
rule are the children of the
dataValue
node mapped from the enclosing element. The child
dataValue
nodes are ordered in document order.
Consider the following example where the element
desc
has mixed content:
<book>
<ISBN>15536455</ISBN>
<title>Introduction to XML</title>
<desc>Basic primer on <keyword>XML</keyword> technology.</desc>
</book>
The result of mapping this XML data document is as follows:
[dataGroup (book)]
[dataValue (ISBN)
[dataValue (title)
= "15536455"]
= "Introduction to XML"]
Home Index Bookmark Pages
Pages: Home Index All Pages