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