RE: Data Model - 4. Nodes

> The final part of Chapter 4, Nodes, reads as follows:
> "Every node belongs to exactly one tree, and every tree has 
> exactly one root 
> node. A tree whose root node is a document node is referred 
> to as a document. 
> A tree whose root node is some other kind of node is referred to as a 
> fragment.".
> 
> Since XPath/XQuery operate on the infoset and the infoset is 
> only defined for 
> the scenario where there is a document node since according 
> to the Infoset 
> Rec it applies only to well-formed XML documents, I don't see 
> where these 
> sentences are leading.

XQuery builds documents "bottom up": it is possible to construct, and
manipulate, element nodes that have not yet been connected into a document
(and perhaps never will be). The data model therefore needs to describe
these "partial InfoSets", which can exist transiently even though they
cannot be obtained by parsing source XML documents.

Michael Kay

Received on Thursday, 16 May 2002 01:56:27 UTC