public class Current extends Function
staticContext
Constructor and Description |
---|
Current() |
Modifier and Type | Method and Description |
---|---|
Value |
evaluate(Context c)
Evaluate in a general context
|
NodeSetValue |
evaluateAsNodeSet(Context c)
Evaluate the function in a node-set context
|
int |
getDataType()
Determine the data type of the expression
|
int |
getDependencies()
Determine the dependencies
|
String |
getName()
Function name (for diagnostics)
|
boolean |
isContextDocumentNodeSet()
Determine, in the case of an expression whose data type is Value.NODESET,
whether all the nodes in the node-set are guaranteed to come from the same
document as the context node.
|
Expression |
reduce(int dep,
Context c)
Reduce the dependencies
|
Expression |
simplify()
Simplify and validate.
|
addArgument, checkArgumentCount, display, getNumberOfArguments
containsReferences, enumerate, evaluateAsBoolean, evaluateAsNumber, evaluateAsString, getStaticContext, indent, make, outputStringValue, setStaticContext, usesCurrent
public String getName()
public int getDataType()
getDataType
in class Expression
public boolean isContextDocumentNodeSet()
isContextDocumentNodeSet
in class Expression
public Expression simplify() throws XPathException
simplify
in class Expression
XPathException
public NodeSetValue evaluateAsNodeSet(Context c) throws XPathException
evaluateAsNodeSet
in class Expression
c
- The context in which the expression is to be evaluatedXPathException
- when the expression does not return a nodeset.public Value evaluate(Context c) throws XPathException
evaluate
in class Expression
c
- The context in which the expression is to be evaluatedXPathException
public int getDependencies()
getDependencies
in class Expression
public Expression reduce(int dep, Context c) throws XPathException
reduce
in class Expression
dep
- The dependencies to be removed, e.g. Context.VARIABLESc
- The context to be used for the partial evaluationXPathException