W3C home > Mailing lists > Public > www-ql@w3.org > January to March 2004

RE: XQuey

From: Michael Kay <mhk@mhk.me.uk>
Date: Wed, 10 Mar 2004 14:33:22 -0000
To: "'Jerome Simeon'" <simeon@us.ibm.com>
Cc: "'Jan Hidders'" <jan.hidders@ua.ac.be>, "'Jan Paredaens'" <Jan.Paredaens@ua.ac.be>, "'Mary Fernandez'" <mff@research.att.com>, "'Philippe Michiels'" <philippe.michiels@ua.ac.be>, <www-ql@w3.org>
Message-Id: <20040310143325.D16C5A095C@frink.w3.org>
The XPath 1.0 specification said that attributes were not included in the
result of the following axis. I see no reason to change that.

 

Michael Kay

 

  _____  

From: Jerome Simeon [mailto:simeon@us.ibm.com] 
Sent: 10 March 2004 14:11
To: Michael Kay
Cc: 'Jan Hidders'; 'Jan Paredaens'; 'Mary Fernandez'; 'Philippe Michiels';
www-ql@w3.org
Subject: RE: XQuey

 


Shouldn't it also contains some attributes nodes from the same element which
are 
considered (by that implementation) to be after that attribute node to be in
document order? 

For instance, 

let $x := <a b="1" c="2"/> return 
$x/@b/following::node() 

may return either () or the attribute 'c', depending on how the
implementation deals with 
document order? 
- Jerome 






"Michael Kay" <mhk@mhk.me.uk> 

03/10/2004 05:21 AM 


To

"'Mary Fernandez'" <mff@research.att.com>, "'Jan Paredaens'"
<Jan.Paredaens@ua.ac.be> 


cc

Jerome Simeon/Watson/IBM@IBMUS, <www-ql@w3.org>, "'Jan Hidders'"
<jan.hidders@ua.ac.be>, "'Philippe Michiels'" <philippe.michiels@ua.ac.be> 


Subject

RE: XQuey

 


 

 




# I agree that the prose and formal meanings  of the following expression
# conflict, but I believe the formal semantics is the correct one, i.e.,
# 
# $x/@attr/following::node() = ()
# 

The XPath 1.0 definition is:

"the following axis contains all nodes in the same document as the context
node that are after the context node in document order, excluding any
descendants and excluding attribute nodes and namespace nodes"

(The accepted meaning of "any descendants" is "descendants of the context
node", while the accepted meaning of "attribute nodes and namespace nodes"
is "all attribute and namespace nodes")

This definition means that the following axis, starting at an attribute,
includes the children of the element containing that attribute.

Michael Kay
Received on Wednesday, 10 March 2004 09:33:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:19 GMT