ContextNodeExpression
, ParentNodeExpression
, RootExpression
public abstract class SingletonExpression extends NodeSetExpression
staticContext
Constructor | Description |
---|---|
SingletonExpression() |
Modifier and Type | Method | Description |
---|---|---|
NodeEnumeration |
enumerate(Context context,
boolean sort) |
Evaluate the expression in a given context to return a Node enumeration
|
boolean |
evaluateAsBoolean(Context context) |
Evaluate as a boolean.
|
NodeSetValue |
evaluateAsNodeSet(Context context) |
Evaluate an expression as a NodeSet.
|
java.lang.String |
evaluateAsString(Context context) |
Evaluate as a string.
|
abstract NodeInfo |
getNode(Context context) |
Get the single node to which this expression refers
|
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.
|
NodeInfo |
selectFirst(Context context) |
Return the first node selected by this Expression when evaluated in the current context
|
containsReferences, display, evaluateAsNumber, getDependencies, getStaticContext, indent, make, reduce, setStaticContext, simplify, usesCurrent
evaluate, getDataType, outputStringValue
public boolean isContextDocumentNodeSet()
isContextDocumentNodeSet
in class Expression
public abstract NodeInfo getNode(Context context) throws XPathException
XPathException
public NodeInfo selectFirst(Context context) throws XPathException
selectFirst
in class NodeSetExpression
context
- The context for the evaluationXPathException
public NodeEnumeration enumerate(Context context, boolean sort) throws XPathException
enumerate
in class NodeSetExpression
context
- the evaluation contextsort
- Indicates result must be in document orderXPathException
- when the expression does not return a nodeset.public NodeSetValue evaluateAsNodeSet(Context context) throws XPathException
evaluateAsNodeSet
in class NodeSetExpression
context
- The context in which the expression is to be evaluatedXPathException
- when the expression does not return a nodeset.public java.lang.String evaluateAsString(Context context) throws XPathException
evaluateAsString
in class NodeSetExpression
context
- The context in which the expression is to be evaluatedXPathException
public boolean evaluateAsBoolean(Context context) throws XPathException
evaluateAsBoolean
in class NodeSetExpression
context
- The context in which the expression is to be evaluatedXPathException