W3C home > Mailing lists > Public > www-ql@w3.org > October to December 2001

RE: "Where" with multiple values

From: Bas de Bakker <bas@x-hive.com>
Date: Tue, 18 Dec 2001 11:33:55 +0100
Message-ID: <41D11F414A26E942912B7E7696DC8E22139834@JAKARTA.xhive.archipel>
To: <jmss@gssi.es>, <www-ql@w3c.org>
Yes, you are wrong.  '<' does not generate a sequence, it returns 'true'
if any value in its left hand operand is less than any value in its
right hand operand ("implicit existential quantification").

Bas de Bakker
X-Hive Corporation

-----Original Message-----
From: www-ql-request@w3.org [mailto:www-ql-request@w3.org]On Behalf Of
Jose Maria Sanchez Saez
Sent: Tuesday, December 18, 2001 11:16
To: www-ql@w3c.org
Subject: "Where" with multiple values

Hi all.

Suppose the next XML document


and let study the next query

FOR $v in //elem
WHERE $v/dat < 5

My problem is the valuation of the WHERE part of the query expression.
the XQuery recommendation:

"Only those tuples for which the condition in the WHERE-clause is true
used to invoke the RETURN clause. The WHERE-clause may contain several 
predicates, connected by AND and OR. "

So, the expression in the WHERE clause have to be evaluable as a
boolean. But 
in my example, $v/dat evaluate as a sequence (doesn't it?), and the
< evaluate for each member of that sequence. So I have a sequence of

Then, I think that this expression will make a mistake, because it
to a sequence of size > 1, and not to a boolean value (or a sequence of
1 of boolean values :-), and it don't care if all the values in the
are true.

Am I wrong?

Thank you, and excuse my English.

José María Sánchez  Sáez  (:-)
Málaga (Spain)
Received on Tuesday, 18 December 2001 05:34:48 UTC

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