W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > June 2001

Re: Semantics of boolean operators

From: Jonathan Robie <Jonathan.Robie@SoftwareAG-USA.com>
Date: Wed, 20 Jun 2001 13:50:08 -0400
Message-Id: <5.1.0.14.0.20010620134801.03d7e490@157.189.12.7>
To: Leonidas Fegaras <fegaras@lambda.uta.edu>, www-xml-query-comments@w3.org
At 05:18 PM 6/19/2001 -0500, Leonidas Fegaras wrote:

>In section 6.2.4.1 (boolean operators) you expressed the semantics of
>boolean operators using (simulated) existential quantification.
>This may not work very well for the following query:
>
>for $a in //book
>where $a/author/firstname/text() = "John"
>   and $a/author/lastname/text() = "Smith"
>return $a/title

I also find that part of the non-intuitive nature of the above query is due 
to the poor choice of variable name. Would the results be as surprising 
with an appropriate variable name?

for $book in //book
where $book/author/firstname/text() = "John"
   and $book/author/lastname/text() = "Smith"
return $book/title

Jonathan
Received on Wednesday, 20 June 2001 13:50:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 2 February 2007 00:13:02 GMT