XQuey

There seems to be an inconsistency in the definition of XQuery

Indeed,

http://www.w3.org/TR/xpath20/

contains:

the following-sibling axis contains the context node's following siblings,
those children of the context node's parent that occur after the context
node in document order; if the context node is an attribute node or
namespace node, the following-sibling axis is empty

the ancestor-or-self axis contains the context node and the ancestors of
the context node;

the following axis contains all nodes that are descendants of the root of
the tree in which the context node is found, are not descendants of the
context node, and occur after the context node in document order




Consider now for instance:

<a attr="g"> <b/> </a>

clearly

<elem>/@attr/following-sibling::node() = empty,
<elem>/following-sibling::node() = empty,
and <elem>/@attr/following::node() = <b/>

But in

http://www.w3.org/TR/2004/WD-xquery-semantics-20040220/#sec_axes

4.2.1.1 is written

[following:: NodeTest] ==
[ancestor-or-self::node()/following-sibling::node()
 /descendant-or-self::NodeTest]

Hence by this definition we have

<elem>/@attr/following::node() = empty.


Jan Paredaens
Philippe Michiels
University of Antwerp
Belgium
               ---------------
---------------| NEW ADDRESS |------------------------------------------------
               ---------------

Prof. dr. Jan Paredaens     Research Group : ADReM
Department WISINF           Office : Building G 1.04b
University of Antwerp       e-mail: Jan.Paredaens@ua.ac.be
Middelheimlaan 1            Tel.: +32 3 265 39 00
B-2020 Antwerp              Fax : +32 3 265 37 77
Belgium                     http://win-www.ruca.ua.ac.be/u/pareda/
                      route:http://win-www.uia.ac.be/hpwisinf/coordinates.html

==============================================================================
******************************************************************************
==============================================================================

Received on Thursday, 11 March 2004 09:10:05 UTC