I checked the documents of the query group again. You are right, in the
XQuery 1.0 paper it says:
For each member of the sequence, the ordering expression must return a single
value of some type for which the “>” operator is defined (for example, a number or a
string); otherwise an error results.
But, as a matter of fact, > is defined on node-sets (even if it is not nicely defiend). In the
semantics paper I did not find this restriction. There just a reference to the ordering
relation > is made, which actually is defiend for sets as:
[[ E1 < E2 ]]
==>
[[ not(empty(for $v1 in [[E1]] return
for $v2 in [[E2]] return
if lt($v1, $v2) then $v1 else ())) ]] ]]
Sven Eri
#API-Management#Tamino#webMethods