|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.Expression net.sf.saxon.expr.FunctionCall net.sf.saxon.functions.SystemFunction net.sf.saxon.functions.NumberFn
public class NumberFn
Implements the XPath number() function. This can also be used as a mapping function in a MappingIterator to map a sequence of values to numbers.
Field Summary |
---|
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, locationId, PROCESS_METHOD, staticProperties |
Constructor Summary | |
---|---|
NumberFn()
|
Method Summary | |
---|---|
PathMap.PathMapNodeSet |
addDocToPathMap(PathMap pathMap,
PathMap.PathMapNodeSet pathMapNodes)
Add a representation of a doc() call or similar function to a PathMap. |
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 |
Item |
map(Item item)
Mapping function for use when converting a sequence of atomic values to doubles using the rules of the number() function |
Expression |
simplify(ExpressionVisitor visitor)
Simplify and validate. |
Expression |
typeCheck(ExpressionVisitor visitor,
ItemType contextItemType)
Type-check the expression. |
Methods inherited from class net.sf.saxon.functions.SystemFunction |
---|
addContextDocumentArgument, checkArguments, computeCardinality, computeSpecialProperties, copy, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefault |
Methods inherited from class net.sf.saxon.expr.FunctionCall |
---|
addExternalFunctionCallToPathMap, checkArgumentCount, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplifyArguments, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NumberFn()
Method Detail |
---|
public Expression simplify(ExpressionVisitor visitor) throws XPathException
simplify
in class FunctionCall
visitor
- an expression visitor
XPathException
- if an error is discovered during expression
rewritingpublic Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException
typeCheck
in class FunctionCall
visitor
- an expression visitorcontextItemType
- the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public PathMap.PathMapNodeSet addDocToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodes)
addDocToPathMap
in class SystemFunction
pathMap
- the PathMap to which the expression should be addedpathMapNodes
- the node in the PathMap representing the focus at the point where this expression
is called. Set to null if this expression appears at the top level.
public Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface EvaluableItem
evaluateItem
in class Expression
context
- The context in which the expression is to be evaluated
XPathException
- if any dynamic error occurs evaluating the
expressionpublic static DoubleValue convert(AtomicValue value)
value
- the value to be converted
public Item map(Item item) throws XPathException
map
in interface ItemMappingFunction
item
- The input item to be mapped.
XPathException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |