XQuery booleans include:
and
or
not()
List books published by Addison-Wesley after 1993:
<bib>
{
for $b in document("bib.xml")/bib/book
where $b/publisher = "Addison-Wesley" and $b/@year > 1993
return
$b/title
}
</bib>
Adapted from XML Query Use Cases