[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:02:37 UTC