[XQuery] Precedence rules for QuantifiedExpr - OrExpr - AndExpr

I would like to enter this as a last call comment from DataDirect.

Jonathan


>  From: "Peter Coppens" <pgp.coppens@pandora.be>
>To: <www-ql@w3.org>
>Date: Fri, 19 Dec 2003 16:36:44 +0100
>Subject: Precedence rules for QuantifiedExpr - OrExpr - AndExpr
>X-Mailing-List: <www-ql@w3.org> archive/latest/701
>X-Loop: www-ql@w3.org
>Sender: www-ql-request@w3.org
>
>All,
>
>Looking at the XQuery spec, I am somewhat surprised by the consequences of
>the precedence rules for QuantifiedExpr - OrExpr and AndExpr
>
>What I mean is:
>
>Take the query
>
>for $x in (1,2,3)
>where
>   some $y in (1,2) satisfies 1 = $y and $y = 1
>return $x
>
>Which, I think, is equivalent to
>
>for $x in (1,2,3)
>where
>   some $y in (1,2) satisfies (1 = $y and $y = 1)
>return $x
>
>But now take the query
>
>for $x in (1,2,3)
>where
>   some $y in (1,2) satisfies 1 = $y or $y = 1
>return $x
>
>
>Which, I think, is equivalent to
>
>for $x in (1,2,3)
>where
>   (some $y in (1,2) satisfies 1 = $y) or $y = 1
>return $x
>
>I find that rather confusing.
>
>So I guess I have the following questions
>
>(1) is the above interpretation correct?
>(2) is this a deliberate choice and if yes, are there any motivations for
>that decision that can be shared?
>(3) would it not be possible to add an extra level of precendence where the
>OrExpr comes to sit between QuantifiedExpr and AndExpr, or would that
>propagate to have other side effects?
>
>Thanks,
>
>Peter

Received on Friday, 19 December 2003 11:57:48 UTC