W3C home > Mailing lists > Public > www-ql@w3.org > April to June 2004

RE: Question regarding order in XPath

From: Michael Kay <mhk@mhk.me.uk>
Date: Sun, 23 May 2004 14:52:45 +0100
To: "'Murali Mani'" <mani@CS.UCLA.EDU>
Cc: <www-ql@w3.org>
Message-Id: <20040523135324.D921CA140A@frink.w3.org>

> 
> However, I am not sure why we should always try to translate // to
> something like descendant-or-self::node()/child; why not 
> define semantics
> for p//text () as -- all nodes in the document in document 
> order with 2
> predicates -- check if they are descendants of p, check if 
> they are text
> nodes.. then we will not switch off the computer !!??

Here are two useful constructs that would not work (or would not produce the
XPath 1.0 results) with this definition:

p//@code

p//item[1]

There are other constructs that are less useful, but still allowed by XPath
1.0, such as

p//..

Michael Kay
Received on Sunday, 23 May 2004 09:53:25 GMT

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