public class NumberFn extends SystemFunction implements MappingFunction
operationargumentlocationId, staticPropertiesEVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD| Constructor and Description |
|---|
NumberFn() |
| Modifier and Type | Method and Description |
|---|---|
static DoubleValue |
convert(AtomicValue value)
Static method to perform the same conversion as the number() function.
|
Item |
evaluateItem(XPathContext context)
Evaluate in a general context
|
Object |
map(Item item,
XPathContext context)
Mapping function for use when converting a sequence of atomic values to doubles
using the rules of the number() function
|
Expression |
simplify(StaticContext env)
Simplify and validate.
|
addContextDocumentArgument, checkArguments, computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefaultcheckArgumentCount, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, preEvaluate, promote, setArguments, setFunctionNameCode, simplifyArguments, typeCheckadoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterate, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, suppressValidation, typeError, typeErrorpublic Expression simplify(StaticContext env) throws XPathException
simplify in interface Expressionsimplify in class FunctionCallXPathException - if an error is discovered during expression
rewritingpublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem in interface ExpressionevaluateItem in class ComputedExpressioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic static DoubleValue convert(AtomicValue value)
public Object map(Item item, XPathContext context) throws XPathException
map in interface MappingFunctionitem - The item to be mapped.
If context is supplied, this must be the same as context.currentItem().context - The processing context. Some mapping functions use this because they require
context information. Some mapping functions modify the context by maintaining the context item
and position. In other cases, the context may be null.XPathException