XFA Specification
Chapter 13, Dealing with Data in Different XML Formats
Extended Mapping Rules
394
The startNode Element
This section describes an extended mapping rule to nominate an element within the XML data document
that is the starting point for the data loader. The data loader processes only the fragment of the XML data
document consisting of that element and its content.
By default, as described in
“Start Element” on page 122,
the data loader starts at the outermost element of
the document. This causes it to attempt to map the whole of the XML data document. When this
extended mapping rule is used, the data loader starts processing at the nominated element. Other
document range constraints, such as namespace constraints, still apply. As a result the document range is
constrained to be not greater than the fragment within the start element.
The XFA Configuration DOM may include a
startNode
element which overrides the default behavior. See
“Config Specification” on page 676
for the full schema. The behavior specified by the XFA Configuration
DOM overrides the default behavior for the entire XML data document. The content of the
startNode
element is a string of the form
"xfasom(somExpr)"
where
somExpr
is a restricted SOM expression.
The general syntax of SOM expressions is defined in
“Scripting Object Model” on page 81.
The expression
in the
startNode
element must be a fully-qualified path of element types (tag names) starting with the
root of the XML data document and referring to a single element, as illustrated in the following example:
<order>
<number>1</number>
<shipto>
<reference><customer>c001</customer></reference>
</shipto>
<contact>Tim Bell</contact>
<date><day>14</day><month>11</month>
<year>1998</year></date>
<item>
<book>
<ISBN>15536455</ISBN>
<title>Introduction to XML</title>
<author>
<firstname>Charles</firstname>
<lastname>Porter</lastname>
</author>
<quantity>1</quantity>
<unitprice>25.00</unitprice>
<discount>.40</discount>
</book>
</item>
<item>
<book>
<ISBN>15536456</ISBN>
<title>XML Power</title>
<author>
<firstname>John</firstname>
<lastname>Smith</lastname>
</author>
<quantity>2</quantity>
<unitprice>30.00</unitprice>
<discount>.40</discount>
</book>
</item>
<notes>You owe $85.00, please pay up!</notes>
Home Index Bookmark Pages
Pages: Home Index All Pages