Class RootExpression
java.lang.Object
net.sf.saxon.expr.ComputedExpression
net.sf.saxon.expr.SingleNodeExpression
net.sf.saxon.expr.RootExpression
- All Implemented Interfaces:
Serializable, SourceLocator, Container, Expression, InstructionInfoProvider
An expression whose value is always a set of nodes containing a single node,
the document root. This corresponds to the XPath Expression "/", including the implicit
"/" at the start of a path expression with a leading "/".
- See Also:
-
Field Summary
Fields inherited from class ComputedExpression
locationId, staticPropertiesFields inherited from interface Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intSpecify that the expression returns a singletonvoiddisplay(int level, PrintStream out, Configuration config) Diagnostic print of expression structurebooleanIs this expression the same as another expression?intDetermine which aspects of the context the expression depends on.Determine the data type of the items returned by this expressiongetNode(XPathContext context) Return the first element selected by this ExpressioninthashCode()get HashCode for comparing two expressionsMethods inherited from class SingleNodeExpression
computeSpecialProperties, effectiveBooleanValue, evaluateItem, iterate, optimize, typeCheckMethods inherited from class ComputedExpression
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterateSubExpressions, markTailFunctionCalls, process, promote, replaceSubExpression, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, simplify, suppressValidation, typeError
-
Constructor Details
-
RootExpression
public RootExpression()
-
-
Method Details
-
equals
-
computeCardinality
public final int computeCardinality()Specify that the expression returns a singleton- Overrides:
computeCardinalityin classSingleNodeExpression
-
getItemType
Determine the data type of the items returned by this expression- Specified by:
getItemTypein interfaceExpression- Overrides:
getItemTypein classSingleNodeExpression- Parameters:
th-- Returns:
- Type.NODE
-
hashCode
-
getNode
Return the first element selected by this Expression- Specified by:
getNodein classSingleNodeExpression- Parameters:
context- The evaluation context- Returns:
- the NodeInfo of the first selected element, or null if no element is selected
- Throws:
XPathException
-
getIntrinsicDependencies
public int getIntrinsicDependencies()Determine which aspects of the context the expression depends on. The result is a bitwise-or'ed value composed from constants such as StaticProperty.VARIABLES and StaticProperty.CURRENT_NODE- Overrides:
getIntrinsicDependenciesin classSingleNodeExpression- Returns:
- a set of bit-significant flags identifying the "intrinsic" dependencies. The flags are documented in class net.sf.saxon.value.StaticProperty
-
display
Diagnostic print of expression structure- Parameters:
level- indentation level for this expressionout- Output destinationconfig-
-