XQuery booleans include:
and
or
not()
List books published by Addison-Wesley before 1993:
<bib>
{
for $book in doc("bib.xml")/bib/book
where $book/publisher = "Addison-Wesley" and $book/@year < 1993
return
$book/title
}
</bib>
Do you notice anything funny about this query?
Adapted from XML Query Use Cases