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

RE: XQuery Normalization

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 16 Jul 2003 18:25:30 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DCFFA@daemsg02.software-ag.de>
To: Philippe Michiels <philippe.michiels@ua.ac.be>, www-ql@w3.org
Cc: jan.hidders@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() "/" 
> RelativePathExpr]Expr
> 
> Without any predicates, these expressions, indeed return the 
> expected result. 
> However, when an index is applied after the // operator, for instance:
>     //a[2],
> 
> a problem arises.

This is indeed true, by design, and is the same as XPath 1.0. The result is
only unexpected, of course, if you have the wrong expectations.

Michael Kay
Received on Wednesday, 16 July 2003 12:25:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC