W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > January 2006

Re: Component interfaces

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Mon, 16 Jan 2006 18:13:27 +0100
Message-ID: <43CBD437.9090101@orbeon.com>
To: public-xml-processing-model-wg@w3.org

Jeni Tennison wrote:
 > Hi Erik,
 >  >> (possibly document nodes containing only a text node child, though
 >  >> that might be bending it too much).
 >> Ouch. I don't think you will find that such a thing is allowed in any
 >> W3C spec.
 > I might be misunderstanding, but I think XDM allows precisely this.
 > See [1] which says:
 >   The children [of a document node] must consist exclusively of
 >   Element, Processing Instruction, Comment, and Text Nodes if it is
 >   not empty. Attribute, Namespace, and Document Nodes can never appear
 >   as children
 > XPath 2.0 allows this because XPath 1.0 allowed it. XPath 1.0 allowed
 > it to support the creation of parsed entities [2] (and, indeed,
 > non-XML text documents) using XSLT.
 > So to properly support XSLT and XQuery then it must be possible to
 > pass around document nodes that do not represent XML documents, such
 > as those that have a single text node as a child.


So if you follow the infoset, you do need at least one element. But if 
you follow the XDM, you do not.

However, if you follow the XDM, you have the concept of item anyway, 
which implies simple types, so you do not really have the need to 
encapsulate text data within a document element (although you could 
define a subset of the XDM that does not support simple types and forces 
the use of document nodes to encapsulate text, but I would not really 
see the point).

Received on Monday, 16 January 2006 17:13:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:38 UTC