- From: Dan Connolly <connolly@w3.org>
- Date: Thu, 12 Apr 2001 09:55:53 -0500
- To: www-xml-query-comments@w3.org
The constructors in the XML Query data model spec are nifty, but they don't seem to be well-defined. Consider: <aDoc><anElt/><anElt/></aDoc> it's clearly got 3 elements: a root element and two children. Section 3.3 Elements suggests its datamodel instance can be constructed ala: elemNode("aDoc", [ elemNode("anElt", []), elemNode("anElt", [])]) (leaving aside namespaces and attributes and using "aDoc" as shorthand for a QNameValue). Let's call the child element nodes e1 and e2: e1 ::= elemNode("anElt", []) e2 ::= elemNode("anElt", []) Since elemNode is a function, clearly elemNode("anElt", []) == elemNode("anElt", []) i.e. e1 == e2 But section 5 "Operators and functions on data-model values" shows that we can distinguish between e1 and e2; in particular, e1 < e2. Given e1==e2, we can substitute equals for equals and get e1 < e1 and e2 < e1 and all sorts of silly conclusions. In order for elemNode to be well-defined, it has to be a function of more than just the qname, the namespace, the attributes and the children of the element; it must also be a function of something like the node before it in document order, no? [[[ 2.1 Types and signatures The data model defines the structure of various kinds of tree nodes; functions to construct tree nodes, called constructors; and functions to access nodes' structure, called accessors. ]]] -- XML Query Data Model http://www.w3.org/TR/2001/WD-query-datamodel-20010215/#section-Types-and-signatures Fri, 16 Feb 2001 00:15:30 GMT -- Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Thursday, 12 April 2001 10:55:55 UTC