Chapter 4, Exchanging Data Between an External Application
and a Basic XFA Form
XFA Specification
Creating, Updating, and Unloading a Basic XFA Data DOM
134
tab U+0009
carriage return U+000D
line feed U+000A
Note that the [XML] specification allows for white space to be contained within the definition of an
element known to enclose only element content, and that such white space is considered insignificant.
Distinguishing between significant and insignificant white space within an XML data document depends
upon rules described in the following sections, and is dependent upon whether the white space is
contained within a data group or a data value.
White Space in Data Groups
If an element within an XML data document has been determined to represent a data group, then all white
space within the data group is ignored by the data loader and is not present in the XFA Data DOM.
This rule respects the common cases where authors of XML data documents include white space as a
legibility aid within elements known to enclose only other child elements.
Consider the following example to illustrate the insignificance of white space within data groups. In the
following fragment of XML the
book
element is known to represent a data group of data values
ISBN
and
title
:
<book>
<ISBN>15536455</ISBN>
<title>Introduction to XML</title>
</book>
Note the additional newlines before and after the data values and the spaces inserted to indent the data
values from the data group to improve legibility. The additional newlines and other white space within
book
data group element are considered insignificant.
The data loader produces the same result from the above example as it would from the following:
<book><ISBN>15536455</ISBN><title>Introduction to XML</title></book>
White Space in Data Values
If an element within an XML data document has been determined to represent a data value, then by
default all white space within the data value is considered significant. Significant white space is processed
as content by the data loader and is present in the XFA Data DOM.
Consider the following example to illustrate the significance of white space within data values. In the
following fragment of XML, the
book
element is known to represent a data group of data values
ISBN
and
title
:
<book>
<ISBN> 15536455 </ISBN>
<title>
Introduction to XML
</title>
</book>
Note the additional newlines before and after the data values and the spaces inserted to indent the data
values from the data group to improve legibility. As described in
“White Space in Data Groups” on
page 134,
the additional newlines and other white space within
book
data group element is considered
insignificant.
Home Index Bookmark Pages
Pages: Home Index All Pages