Re: Component interfaces

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.



Jeni Tennison

Received on Monday, 16 January 2006 17:03:25 UTC