XFA Specification
Chapter 3, Object Models in XFA
Document Object Models
72
scripts. However the XFA Data DOM is tightly coupled to the XML Data DOM and exposes some of the XML
Data DOM’s content to scripts.
The following illustration shows the hierarchy of the principal DOMs in XFA.
config
Config DOM
data
dataSets
dataDescription
xfa
form
Form DOM
Data DOM
Data Description DOM
layout
Layout DOM
XFA DOM
template
Template DOM
Hierarchy of the DOMs
DOMs and XML
Most of the DOMs used in XFA can be loaded from or written out as XML documents. One such document
is an XDP, which like the XFA DOM is a container for subtrees representing other DOMs.
The XML DOM specification
[XMLDOM2]
defines a standard way in which a DOM loads from XML and is
stored in XML. The various XFA DOMs differ slightly from the norm in their relationship to XML documents.
First, they treat white space differently. Second, they distinguish between properties and children, a
distinction that is not made in
[XMLDOM2].
Note that a similar hierarchy is used in XDP documents to represent a collection of DOMs in a single
document. However an XDP may contain subtrees that are not represented by a DOM (for example
application-specific data). At the same time some DOMs (such as the Form and Layout DOMs) are never
represented in an XDP. For this reason in an XDP the outermost element tag is
xdp
rather than
xfa
.
Grouping Elements and Whitespace
In XML whitespace is significant by default. However, many schemas allow the free inclusion of whitespace
within
grouping elements.
A grouping element is one that directly contains only other elements, not literal
content. Freedom to include whitespace allows indentation which makes XML more readable.
Within XFA schemas all grouping elements may include whitespace. When loading an XFA DOM
whitespace inside grouping elements is discarded. When unloading an XFA DOM whitespace may legally
be inserted; whether it is, how much, and where are application-defined.
Home Index Bookmark Pages
Pages: Home Index All Pages