ascending
descending
empty greatest
empty least
collation "name"
<bib>
{
for $b in doc("bib.xml")//book[publisher = "Addison-Wesley"]
order by ($b/title) descending
return
<book>
{ $b/@year } { $b/title }
</book>
}
</bib>
Adapted from XML Query Use Cases