[xquery-talk] Question on expected XQuery return per standards

Michael Rys mrys at microsoft.com
Sat Mar 28 19:55:10 PST 2009

We had huge discussions around this in the beginning of the XQuery development, whether we need to preserve these confusing (to the end user) semantics of XPath 1.0. Backwards-compatibility and unification of XPath 2.0 for XSLT and XQuery won out in the end.

Best regards

-----Original Message-----
From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of Christian Grün
Sent: Friday, March 27, 2009 11:39 PM
To: talk at xquery.com
Subject: Re: [xquery-talk] Question on expected XQuery return per standards

>> But it isn't. The standard is very clear that $xml//p expands to
>> $xml/descendant-or-self::node()/p. The ordering is also very clear:

Just to add: I observed that this rule regularly causes irritations
when teaching XPath/XQuery, as many users assume that the two slashes
can be dissolved to a single descendant step, which actually works
fine - as long as no position predicates are involved.



Christian Gruen
Universitaet Konstanz
Department of Computer & Information Science
D-78457 Konstanz, Germany
Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577
talk at x-query.com

More information about the talk mailing list