Chapter 4, Exchanging Data Between an External Application
and a Basic XFA Form
XFA Specification
Creating, Updating, and Unloading a Basic XFA Data DOM
129
[dataValue (desc)
= "Basic primer on XML technology."]
[dataValue ()
= "Basic primer on "]
[dataValue (keyword) = "XML"]
[dataValue ()
= " technology."]
In the above example the element
desc
maps to a
dataValue
node where
"Basic primer on …"
is an enclosed unit of character data so it maps to a
dataValue
node
named
""
"XML"
is the content of an enclosed element with the element tag
keyword
so it maps to a
dataValue
node named
"keyword"
" technology."
is another enclosed unit of character data so it maps to another
dataValue
node
named
""
each of these three
dataValue
nodes is a child of the
desc dataValue
node
the children of
desc
are in the same order that they occur in the XML data document
the value of
desc
is formed by concatenating
"Basic primer on "
,
"XML"
, and
" technology"
in that order
Data Values Containing Empty Elements
For each empty element within the document range, the data loader by default maps the element into a
null
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 an empty string
the
contains
property of the
dataValue
node is set to
data
the
isNull
property of the
dataValue
node is set to
1
the
nullType
property of the
dataValue
node is set to
empty
This specification provides an extended mapping rule described in section
“The presence Element” on
page 383
for overriding this by default behavior by explicitly forcing an empty element to be mapped to a
data group. In addition, a data description may be used to specify a different type of null data handling for
the element as described in
“dd:nullType Attribute” on page 753.
Consider the following example where the element
desc
is empty:
<book>
<ISBN>15536455</ISBN>
<title>Introduction to XML</title>
<desc></desc>
</book>
Of course, as defined by the [XML] specification, this example is equivalent to the following:
<book>
<ISBN>15536455</ISBN>
<title>Introduction to XML</title>
<desc/>
</book>
The result of the mapping is as follows:
[dataGroup (book)]
Home Index Bookmark Pages
Pages: Home Index All Pages