net.sf.saxon.expr

Class ParentNodeExpression

Implemented Interfaces:
EvaluableItem, InstructionInfoProvider, SequenceIterable, Serializable, SourceLocator

public class ParentNodeExpression
extends SingleNodeExpression

Class ParentNodeExpression represents the XPath expression ".." or "parent::node()"

Field Summary

Fields inherited from class net.sf.saxon.expr.Expression

EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD, locationId, staticProperties

Method Summary

PathMap.PathMapNodeSet
addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap.
Expression
copy()
Copy an expression.
boolean
equals(Object other)
Is this expression the same as another expression?
void
explain(ExpressionPresenter destination)
Diagnostic print of expression structure.
NodeInfo
getNode(XPathContext context)
Return the node selected by this SingleNodeExpression
int
hashCode()
get HashCode for comparing two expressions
String
toString()
The toString() method for an expression attempts to give a representation of the expression in an XPath-like form, but there is no guarantee that the syntax will actually be true XPath.

Methods inherited from class net.sf.saxon.expr.SingleNodeExpression

computeCardinality, computeSpecialProperties, effectiveBooleanValue, evaluateItem, getIntrinsicDependencies, getItemType, getNode, iterate, optimize, typeCheck

Methods inherited from class net.sf.saxon.expr.Expression

addToPathMap, adoptChildExpression, checkPermittedContents, computeCardinality, computeDependencies, computeSpecialProperties, computeStaticProperties, copy, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, explain, explain, findParentOf, getCardinality, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getItemType, getLineNumber, getLocationId, getLocationProvider, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, iterate, iterateEvents, iterateSubExpressions, markTailFunctionCalls, optimize, process, promote, replaceSubExpression, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, simplify, staticTypeCheck, suppressValidation, toString, typeCheck, typeError

Method Details

addToPathMap

public PathMap.PathMapNodeSet addToPathMap(PathMap pathMap,
                                           PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap. The PathMap captures a map of the nodes visited by an expression in a source tree.
Overrides:
addToPathMap in interface Expression
Parameters:
pathMap - the PathMap to which the expression should be added
pathMapNodeSet -
Returns:
the pathMapNode representing the focus established by this expression, in the case where this expression is the first operand of a path expression or filter expression

copy

public Expression copy()
Copy an expression. This makes a deep copy.
Overrides:
copy in interface Expression
Returns:
the copy of the original expression

equals

public boolean equals(Object other)
Is this expression the same as another expression?

explain

public void explain(ExpressionPresenter destination)
Diagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.
Overrides:
explain in interface Expression

getNode

public NodeInfo getNode(XPathContext context)
            throws XPathException
Return the node selected by this SingleNodeExpression
Overrides:
getNode in interface SingleNodeExpression
Parameters:
context - The context for the evaluation
Returns:
the parent of the current node defined by the context

hashCode

public int hashCode()
get HashCode for comparing two expressions

toString

public String toString()
The toString() method for an expression attempts to give a representation of the expression in an XPath-like form, but there is no guarantee that the syntax will actually be true XPath. In the case of XSLT instructions, the toString() method gives an abstracted view of the syntax
Overrides:
toString in interface Expression