Tamino XML Server Version 9.7
 —  X-Query Reference Guide  —

SortByClause

Sort a set of nodes within or across documents in ascending or descending order. The sort criterion is specified by a relative location path.


Syntax

SortByClause

graphics/SortByClause.jpg

Top of page

Description

In Tamino, you can use a SortByClause for sort operations using the following keywords:

sortby

nodes within a document (intra-document sort)

sortall

multiple documents (inter-document sort)

If there is a collation defined for the element or attribute that is used as sort criterion, then the sort will be based on that collation. You can specify multiple sort criteria by separating them with a comma. The default sorting order is ascending, but you can also specify a descending order (see SortByCharacteristics).

Usage Information

The following restriction applies to sortby operations within a document:

Top of page

Compatibility

There is no SortByClause in XPath.

In previous versions, a sortby expression that is immediately located after the root node (e.g. /A sortby (.), has the same semantics as /A sortall (.) now, namely performing an inter-document sorting. This has been retained for compatibility.

Top of page

Examples

Top of page

Related Expressions

Step SetExpr, FilterExpr

Top of page