Class ParentNodeExpression
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.SingleNodeExpression
net.sf.saxon.expr.ParentNodeExpression
- All Implemented Interfaces:
Serializable, SourceLocator, LocationProvider, SaxonLocator, InstructionInfo, Locator
Class ParentNodeExpression represents the XPath expression ".." or "parent::node()"
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet) Add a representation of this expression to a PathMap.copy()Copy an expression.booleanIs this expression the same as another expression?voidexplain(ExpressionPresenter destination) Diagnostic print of expression structure.Get a name identifying the kind of expression, in terms meaningful to a user.getNode(XPathContext context) Return the node selected by this SingleNodeExpressioninthashCode()get HashCode for comparing two expressionsprotected StringCustomize the error message on type checkingtoString()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 SingleNodeExpression
computeCardinality, computeSpecialProperties, effectiveBooleanValue, evaluateItem, getIntrinsicDependencies, getItemType, isContextPossiblyUndefined, iterate, optimize, typeCheckMethods inherited from class Expression
adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getImplementationMethod, getIntegerBounds, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSameFocusSubExpressions, iterateSubExpressions, markTailFunctionCalls, process, promote, replaceSubExpression, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, simplify, staticTypeCheck, suppressValidation, typeError
-
Constructor Details
-
ParentNodeExpression
public ParentNodeExpression()
-
-
Method Details
-
getExpressionName
Get a name identifying the kind of expression, in terms meaningful to a user.- Overrides:
getExpressionNamein classExpression- Returns:
- a name identifying the kind of expression, in terms meaningful to a user. The name will always be in the form of a lexical XML QName, and should match the name used in explain() output displaying the expression.
-
noContextMessage
Customize the error message on type checking- Specified by:
noContextMessagein classSingleNodeExpression
-
getNode
Return the node selected by this SingleNodeExpression- Specified by:
getNodein classSingleNodeExpression- Parameters:
context- The context for the evaluation- Returns:
- the parent of the current node defined by the context
- Throws:
XPathException
-
copy
Copy an expression. This makes a deep copy.- Specified by:
copyin classExpression- Returns:
- the copy of the original expression
-
addToPathMap
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:
addToPathMapin classExpression- Parameters:
pathMap- the PathMap to which the expression should be addedpathMapNodeSet-- 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
-
equals
-
hashCode
-
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:
toStringin classExpression- Returns:
- a representation of the expression as a string
-
explain
Diagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.- Specified by:
explainin classExpression- Parameters:
destination- the expression presenter used to display the structure
-