public class NormalizeSpace extends SystemFunction
operation
argument
locationId, staticProperties
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
Constructor and Description |
---|
NormalizeSpace() |
Modifier and Type | Method and Description |
---|---|
Item |
evaluateItem(XPathContext c)
Evaluate in a general context
|
int |
getIntrinsicDependencies()
Determine the intrinsic dependencies of an expression, that is, those which are not derived
from the dependencies of its subexpressions.
|
static CharSequence |
normalize(CharSequence s)
The algorithm that does the work: it removes leading and trailing whitespace, and
replaces internal whitespace by a single space character.
|
Expression |
preEvaluate(StaticContext env)
Pre-evaluate a function at compile time.
|
Expression |
simplify(StaticContext env)
Simplify and validate.
|
addContextDocumentArgument, checkArguments, computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefault
checkArgumentCount, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, promote, setArguments, setFunctionNameCode, simplifyArguments, typeCheck
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterate, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, suppressValidation, typeError, typeError
public Expression simplify(StaticContext env) throws XPathException
simplify
in interface Expression
simplify
in class FunctionCall
XPathException
- if an error is discovered during expression
rewritingpublic int getIntrinsicDependencies()
getIntrinsicDependencies
in class ComputedExpression
public Expression preEvaluate(StaticContext env) throws XPathException
preEvaluate
in class FunctionCall
XPathException
public Item evaluateItem(XPathContext c) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class ComputedExpression
c
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic static CharSequence normalize(CharSequence s)