public abstract class CollatingFunction extends SystemFunctionCall
Modifier and Type | Field and Description |
---|---|
protected StringCollator |
staticCollation |
operation
argument
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, INHERITED_CONTEXT, INSPECTION_CONTEXT, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, NAVIGATION_CONTEXT, NODE_VALUE_CONTEXT, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, W3C_CONSUMING, W3C_FREE_RANGING, W3C_GROUP_CONSUMING, W3C_MOTIONLESS, WATCH_METHOD
Constructor and Description |
---|
CollatingFunction() |
Modifier and Type | Method and Description |
---|---|
void |
bindStaticContext(StaticContext env)
Bind aspects of the static context on which the particular function depends
|
void |
checkArguments(ExpressionVisitor visitor)
Method called during static type checking
|
Expression |
copy()
Copy an expression.
|
boolean |
equals(Object o)
Determine whether two expressions are equivalent
|
static String |
expandCollationURI(String collationName,
URI expressionBaseURI)
Expand a collation URI, which may be a relative URI reference
|
protected AtomicComparer |
getAtomicComparer(StringCollator collator,
XPathContext context)
During evaluation, get the pre-allocated atomic comparer if available, or allocate a new one otherwise
|
protected abstract int |
getCollationArgument()
Get the argument position (0-based) containing the collation name
|
protected StringCollator |
getCollator(XPathContext context)
Get a collator suitable for comparing strings.
|
protected StringCollator |
getCollatorFromLastArgument(Sequence[] arguments,
int arg,
XPathContext context)
Get a collator suitable for comparing strings.
|
URI |
getExpressionBaseURI()
Get the saved static base URI
|
AtomicComparer |
getPreAllocatedAtomicComparer()
Get the pre-allocated atomic comparer, if available
|
StringCollator |
getStaticCollation()
Get the collation if known statically, as a StringCollator object
|
protected void |
preAllocateComparer(AtomicType type0,
AtomicType type1,
StaticContext env,
boolean NaNequalsNaN)
During static analysis, if types are known and the collation is known, pre-allocate a comparer
for comparing atomic values.
|
addContextDocumentArgument, addDocToPathMap, computeCardinality, computeSpecialProperties, equalOrNull, getContextNode, getConvertingCallable, getDefaultArgumentNode, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getImplementationMethod, getItemType, getOperation, getRequiredType, iterateSubExpressionInfo, makeSystemFunction, optimize, setDetails, useContextItemAsDefault
addExternalFunctionCallToPathMap, checkArgumentCount, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheck
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getExpressionCompiler, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getStreamingAdjunct, getSystemId, getSystemId, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, typeError
protected StringCollator staticCollation
public void bindStaticContext(StaticContext env) throws XPathException
bindStaticContext
in class SystemFunctionCall
env
- the static context of the function callXPathException
- if execution with this static context will inevitably failprotected abstract int getCollationArgument()
public void checkArguments(ExpressionVisitor visitor) throws XPathException
SystemFunctionCall
checkArguments
in class SystemFunctionCall
visitor
- the expression visitorXPathException
- if the arguments are incorrectpublic URI getExpressionBaseURI()
public StringCollator getStaticCollation()
public Expression copy()
copy
in class SystemFunctionCall
public boolean equals(Object o)
equals
in class SystemFunctionCall
protected StringCollator getCollator(XPathContext context) throws XPathException
This method is used only when evaluating static function calls.
context
- The dynamic contextXPathException
- if a failure occurs evaluating the collation argument, or if the
specified collation is not recognizedprotected StringCollator getCollatorFromLastArgument(Sequence[] arguments, int arg, XPathContext context) throws XPathException
This method is used only when evaluating dynamic function calls.
arguments
- The arguments supplied to the function callarg
- The position of the argument (base 0) containing the collation namecontext
- The dynamic contextXPathException
- if a failure occurs evaluating the collation argument, or if the
specified collation is not recognizedpublic static String expandCollationURI(String collationName, URI expressionBaseURI) throws XPathException
collationName
- the collation URI as providedexpressionBaseURI
- the base URI against which the collation URI will be resolved if it is relativeXPathException
- if the collation URI cannot be resolvedprotected void preAllocateComparer(AtomicType type0, AtomicType type1, StaticContext env, boolean NaNequalsNaN)
type0
- the type of the first comparandtype1
- the type of the second comparandenv
- the static contextNaNequalsNaN
- true if two NaN values are to be considered equalpublic AtomicComparer getPreAllocatedAtomicComparer()
protected AtomicComparer getAtomicComparer(StringCollator collator, XPathContext context)
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.