java.io.Serializable, javax.xml.transform.SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, SequenceIterable, InstructionInfo, org.xml.sax.Locatorpublic class Evaluate extends SystemFunction
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Evaluate.PreparedExpression |
Inner class PreparedExpression represents a compiled XPath expression together
with the standard variables $p1 ..
|
| Modifier and Type | Field | Description |
|---|---|---|
static int |
EVAL |
|
static int |
EVALUATE |
|
static int |
EVALUATE_NODE |
|
static int |
EXPRESSION |
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticPropertiesargumentoperation| Constructor | Description |
|---|---|
Evaluate() |
| Modifier and Type | Method | Description |
|---|---|---|
PathMap.PathMapNodeSet |
addToPathMap(PathMap pathMap,
PathMap.PathMapNodeSet pathMapNodeSet) |
Add a representation of this expression to a PathMap.
|
void |
checkArguments(ExpressionVisitor visitor) |
Method supplied by each class of function to check arguments during parsing, when all
the argument expressions have been read
|
Item |
evaluateItem(XPathContext c) |
Evaluate in a general context
|
int |
getIntrinsicDependencies() |
Determine the dependencies
|
protected SequenceType |
getRequiredType(int arg) |
Get the required type of the nth argument
|
SequenceIterator |
iterate(XPathContext c) |
Iterate over the results of the function
|
Expression |
preEvaluate(ExpressionVisitor visitor) |
preEvaluate: for saxon:expression, if the expression is
known at compile time, then it is compiled at compile time.
|
adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, findParentOf, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeErroraddExternalFunctionCallToPathMap, checkArgumentCount, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheckclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddContextDocumentArgument, addDocToPathMap, computeCardinality, computeSpecialProperties, copy, getDetails, getErrorCodeForTypeErrors, getItemType, makeSystemFunction, optimize, setDetails, useContextItemAsDefaultpublic static final int EVALUATE
public static final int EXPRESSION
public static final int EVAL
public static final int EVALUATE_NODE
protected SequenceType getRequiredType(int arg)
getRequiredType in class SystemFunctionarg - the number of the argument whose type is requested, zero-basedpublic void checkArguments(ExpressionVisitor visitor) throws XPathException
checkArguments in class SystemFunctionvisitor - the expression visitorXPathExceptionpublic Expression preEvaluate(ExpressionVisitor visitor) throws XPathException
preEvaluate in class FunctionCallvisitor - an expression visitorXPathExceptionpublic PathMap.PathMapNodeSet addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
The default implementation of this method assumes that an expression does no navigation other than the navigation done by evaluating its subexpressions, and that the subexpressions are evaluated in the same context as the containing expression. The method must be overridden for any expression where these assumptions do not hold. For example, implementations exist for AxisExpression, ParentExpression, and RootExpression (because they perform navigation), and for the doc(), document(), and collection() functions because they create a new navigation root. Implementations also exist for PathExpression and FilterExpression because they have subexpressions that are evaluated in a different context from the calling expression.
This particular implementation has to deal with the fact that saxon:evaluate() and related functions can navigate anywhere in the tree.
addToPathMap in class ExpressionpathMap - the PathMap to which the expression should be addedpathMapNodeSet - the PathMapNodeSet to which the paths embodied in this expression should be addedpublic Item evaluateItem(XPathContext c) throws XPathException
evaluateItem in interface EvaluableItemevaluateItem in class Expressionc - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic SequenceIterator iterate(XPathContext c) throws XPathException
iterate in interface SequenceIterableiterate in class Expressionc - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionpublic int getIntrinsicDependencies()
getIntrinsicDependencies in class Expression