After processing a
LOOKUP and any traversals, the set of nodes is in an arbitrary order. If the query expression contains an ORDER BY clause, the set is sorted according to the clause. The clause is a comma separated list of attributes (or key expressions, function calls, and so on). The set is sorted according to the first attribute in the list; those that are identical by the first attribute are further sorted according to the second attribute in the list, and so on.
Sorting is normally in ascending order; the order can be reversed with the DESC modifier:
If the search expression does not have an
ORDER BY clause, it is returned in an arbitrary order unless the taxonomy is consulted for the
SHOW clause. For more information, see the following section. In that case, the set is sorted by the taxonomy-defined label attribute.
Named taxonomy attribute lists
The taxonomy supports multiple named attribute lists. These can be referred to in queries using the TAXONOMY keyword. For example: