Re: [XQuery] 3.2.4 //@version

Andrew,
I believe that the correct expansion of the abbreviated path expression 
//@version is as follows, as documented in Section 3.2.4 of the XQuery 
specification:

/descendant-or-self::node()/attribute::version

I think that this expanded expression returns all the version attribute 
nodes that are in the same document as the context node, as stated.

Please let me know if you agree with this analysis.
Regards,
--Don Chamberlin




Svgdeveloper@aol.com 
Sent by: public-qt-comments-request@w3.org
01/14/2004 01:02 PM

To
public-qt-comments@w3.org
cc

Subject
[XQuery] 3.2.4 //@version






In 3.2.4, in the bulleted list, the expression //@version is stated to 
select all the version attribute nodes that are in the same document as 
the context node.

However, if // is an abbreviation for the descendant-of-self axis, as I 
take it to be, then the stated selection seems incongruous.

There are no attribute nodes in the child axis, by definition. Since the 
descedant axis consists of nodes in the child axis and their child nodes 
etc the descendant-or-self axis never returns any attribute nodes, with 
the sole exception of the situation where the context node is an attribute 
node. Since with the expression given the context node for that absolute 
path is the document node then it should never return any attribute nodes, 
in my understanding.

Andrew Watt

Received on Wednesday, 14 January 2004 16:35:18 UTC