XQuery se typicky použije např. pro:
group by
clause in FLWOR Expressions (3.9.7
Group By Clause).
tumbling window and sliding window in FLWOR Expressions (3.9.4 Window Clause).
count
clause in FLWOR Expressions (3.9.6
Count Clause).
allowing empty
in 3.9.2 For Clause, for
functionality similar to outer joins in SQL.
try/catch
expressions (3.14 Try/Catch
Expressions).
Dynamic function invocation (3.2.2 Dynamic Function Invocation).
Inline functions (3.1.7 Inline Functions).
Private functions (4.18 Function Declaration).
Nondeterministic functions (4.18 Function Declaration)
Switch expressions (3.12 Switch Expression)
Computed namespace constructors (3.8.3.7 Computed Namespace Constructors).
Output declarations (2.2.4 Serialization).
Annotations (4.15 Annotations). Annotation assertions in function tests.