There are lots of ways of solving a problem in XQuery. This sites examines a number of common tasks and ways in which each might be solved. Multiple solutions are numerically compared on execution time and raw length XQuery length.
Scripts are executed on eXist 2.0 Build 20130207.
A Kit Wallace