Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.CollatingFunction
public abstract class CollatingFunction
extends SystemFunction
Field Summary | |
protected StringCollator |
Fields inherited from class net.sf.saxon.functions.SystemFunction | |
operation |
Fields inherited from class net.sf.saxon.expr.FunctionCall | |
argument |
Fields inherited from class net.sf.saxon.expr.Expression | |
EVALUATE_METHOD , ITERATE_METHOD , PROCESS_METHOD , locationId , staticProperties |
Method Summary | |
void |
|
Expression |
|
protected GenericAtomicComparer |
|
protected StringCollator |
|
URI |
|
StringCollator |
|
Methods inherited from class net.sf.saxon.functions.SystemFunction | |
addContextDocumentArgument , addDocToPathMap , checkArguments , computeCardinality , computeSpecialProperties , copy , getDetails , getErrorCodeForTypeErrors , getItemType , getRequiredType , makeSystemFunction , optimize , setDetails , useContextItemAsDefault |
Methods inherited from class net.sf.saxon.expr.FunctionCall | |
addExternalFunctionCallToPathMap , checkArgumentCount , checkArguments , equals , explain , getArguments , getDisplayName , getFunctionName , getNumberOfArguments , hashCode , iterateSubExpressions , optimize , preEvaluate , promote , replaceSubExpression , setArguments , setFunctionName , simplify , simplifyArguments , toString , typeCheck |
public void checkArguments(ExpressionVisitor visitor) throws XPathException
Method called during static type checking
- Overrides:
- checkArguments in interface SystemFunction
public Expression copy()
Copy an expression. This makes a deep copy.
- Overrides:
- copy in interface SystemFunction
- Returns:
- the copy of the original expression
protected GenericAtomicComparer getAtomicComparer(int arg, XPathContext context) throws XPathException
Get a GenericAtomicComparer that can be used to compare values. This method is called at run time by subclasses to evaluate the parameter containing the collation name. The difference between this method andgetCollator(int,XPathContext)
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 usedcontext
- The dynamic evaluation context.
- Returns:
- a GenericAtomicComparer that can be used to compare atomic values.
protected StringCollator getCollator(int arg, XPathContext context) throws XPathException
Get a collator suitable for comparing strings. Returns the collator specified in the given function argument if present, otherwise returns the default collator. This method is called by subclasses at run time. It is used (in contrast togetAtomicComparer(int,XPathContext)
) when it is known that the values to be compared are always strings.
- Parameters:
arg
- The argument position (counting from zero) that holds the collation URI if presentcontext
- The dynamic context
- Returns:
- a StringCollator
public URI getExpressionBaseURI()
Get the saved static base URI
- Returns:
- the static base URI
public StringCollator getStringCollator()
Get the collation if known statically, as a StringCollator object
- Returns:
- a StringCollator. Return null if the collation is not known statically.