RE: Data Model: 4.1.4 Parent Accessor

> Can a root node which is not a document node be a parent node?
> 

Yes, it can. The XQuery expression

<a><b/><a>

yields an element node a which has no parent (and is therefore a root), and
which has a child b.

Since the latest XSLT 2.0 draft it is also possible to create such
structures in XSLT:

<xsl:variable name="orphan" as="element()">
 <a><b/></a>
</xsl:variable>

Michael Kay

Received on Wednesday, 7 May 2003 17:21:02 UTC