All Implemented Interfaces:

public class collation extends FunctionBase2
Access to a NodeValue which is a collection (NodeValueSortKey). See FN_CollationKey for the Functions and Operators function. This function takes two parameters. First is the collation (a string), second the NodeValue result of an Expr (ExprVar, ExprFunctionN, NodeValue, etc).

If called with a prefix afn, e.g. ORDER BY afn:collation("fi", ?label);. The first argument (in this case, "fi") is then resolved to a Locale, that is used to build a Collator. If a locale does not match any known collator, then a rule based collator (RuleBasedCollator) is returned, but with no rules, returning values in natural order, not applying any specific collation order.

The second argument, which is an Expr, will have its literal string value extracted (or will raise an error if it is not possible). This means that if the expr is a NodeValueLang (e.g. rendered from "Casa"@pt), the language tag will be discarded, and only the literal string value (i.e. Casa) will be taken into account for this function.

See Also: