net.sf.saxon.functions
public abstract class CollatingFunction extends SystemFunction
Field Summary | |
---|---|
protected StringCollator | stringCollator |
Method Summary | |
---|---|
void | checkArguments(ExpressionVisitor visitor) |
Expression | copy()
Copy an expression. |
String | getAbsoluteCollationURI()
Get the absolute collation URI if known statically, as a string |
protected GenericAtomicComparer | getAtomicComparer(int arg, XPathContext context)
Get a GenericAtomicComparer that can be used to compare values. |
protected StringCollator | getCollator(int arg, XPathContext context)
Get a collator suitable for comparing strings. |
URI | getExpressionBaseURI()
Get the saved static base URI |
StringCollator | getStringCollator()
Get the collation if known statically, as a StringCollator object |
Returns: the copy of the original expression
Returns: the absolute collation URI, as a string, or null if it is not known statically
The difference between this method and CollatingFunction is that a GenericAtomicComparer is capable of comparing values of any atomic type, not only strings. It is therefore called by functions such as compare, deep-equal, index-of, and min() and max() where the operands may include a mixture of strings and other types.
Parameters: arg the position of the argument (starting at 0) containing the collation name. If this argument was not supplied, the default collation is used context The dynamic evaluation context.
Returns: a GenericAtomicComparer that can be used to compare atomic values.
Parameters: arg The argument position (counting from zero) that holds the collation URI if present context The dynamic context
Returns: a StringCollator
Returns: the static base URI
Returns: a StringCollator. Return null if the collation is not known statically.