W3C home > Mailing lists > Public > www-ql@w3.org > July to September 2003

XQuery Normalization

From: Philippe Michiels <philippe.michiels@ua.ac.be>
Date: Tue, 15 Jul 2003 16:36:13 +0200
To: www-ql@w3.org
Cc: jan.hidders@ua.ac.be
Message-Id: <200307151636.13692.philippe.michiels@ua.ac.be>


There seems to be some curiosity in the normalization of the double slash 
operator in XPath expressions (XQuery 1.0 and XPath 2.0 formal semantics 
draft), which is normalized as follows:

["//" RelativePathExpr]Expr    ==    
[fn:root( self::node() ) "/" descendant-or-self::node() "/" 

Without any predicates, these expressions, indeed return the expected result. 
However, when an index is applied after the // operator, for instance:

a problem arises. Now, this path expression is (in a first step) normalized 
(selects all second a-children of the descendant nodes),

which is something totally different than
(selects the second a-descendant)

which is the behavior I would expect. Off course, someone who knows the 
normalization rules understands why the two expressions yield different 
results, but is this really what the designers of XPath had in mind?

-- Philippe
Philippe Michiels
ADReM Research Group --  dept. WisInf   
Universiteit Antwerpen
Middelheimlaan 1
2020 Antwerpen

tel: 32 (3) 218 0880
Received on Tuesday, 15 July 2003 10:37:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:42 UTC