net.sf.saxon.functions

Class Evaluate

public class Evaluate extends SystemFunction

This class implements the saxon:evaluate(), saxon:expression(), and saxon:eval() extension functions, which are specially-recognized by the system because they need access to parts of the static context
Nested Class Summary
static classEvaluate.PreparedExpression
Inner class PreparedExpression represents a compiled XPath expression together with the standard variables $p1 ..
Field Summary
InstructionDetailsdetails
static intEVAL
static intEVALUATE
static intEVALUATE_NODE
static intEXPRESSION
IndependentContextstaticContext
Method Summary
voidcheckArguments(StaticContext env)
Method supplied by each class of function to check arguments during parsing, when all the argument expressions have been read
ItemevaluateItem(XPathContext c)
Evaluate in a general context
intgetIntrinsicDependencies()
Determine the dependencies
protected SequenceTypegetRequiredType(int arg)
Get the required type of the nth argument
SequenceIteratoriterate(XPathContext c)
Iterate over the results of the function
ExpressionpreEvaluate(StaticContext env)
preEvaluate: for saxon:expression, if the expression is known at compile time, then it is compiled at compile time.

Field Detail

details

InstructionDetails details

EVAL

public static final int EVAL

EVALUATE

public static final int EVALUATE

EVALUATE_NODE

public static final int EVALUATE_NODE

EXPRESSION

public static final int EXPRESSION

staticContext

IndependentContext staticContext

Method Detail

checkArguments

public void checkArguments(StaticContext env)
Method supplied by each class of function to check arguments during parsing, when all the argument expressions have been read

evaluateItem

public Item evaluateItem(XPathContext c)
Evaluate in a general context

getIntrinsicDependencies

public int getIntrinsicDependencies()
Determine the dependencies

getRequiredType

protected SequenceType getRequiredType(int arg)
Get the required type of the nth argument

iterate

public SequenceIterator iterate(XPathContext c)
Iterate over the results of the function

preEvaluate

public Expression preEvaluate(StaticContext env)
preEvaluate: for saxon:expression, if the expression is known at compile time, then it is compiled at compile time. In other cases this method suppresses compile-time evaluation by doing nothing (because the value of the expression depends on the runtime context).