com.icl.saxon.sort
Class SortKeyDefinition
public
class
SortKeyDefinition
extends Object
A SortKeyDefinition defines one component of a sort key.
Note that most attributes defining the sort key can be attribute value templates,
and can therefore vary from one invocation to another. We hold them as expressions,
but optimise for the case where the attributes are all fixed strings: in this case
we can use the same Comparer object each time.
public void bindComparer()
If possible, use the same comparer every time
Get a Comparer which can be used to compare two values according to this sort key.
Set the case order. This is supplied as an expression which must evaluate to "upper-first"
or "lower-first" or "#default". If the order is fixed, supply e.g. new StringValue("lower-first").
Default is "#default".
Set the data type. This is supplied as an expression which must evaluate to "text",
"number", or a QName. If the data type is fixed, supply e.g. new StringValue("text").
Default is "text".
Set the language. This is supplied as an expression which evaluate to the language name.
If the order is fixed, supply e.g. new StringValue("de").
Default is "en".
Set the order. This is supplied as an expression which must evaluate to "ascending"
or "descending". If the order is fixed, supply e.g. new StringValue("ascending").
Default is "ascending".
Set the expression used as the sort key
Set the static context. This is used only for resolving any QName supplied in the data-type
property.