net.sf.saxon.expr
Class ParentNodeExpression

java.lang.Object
  extended bynet.sf.saxon.expr.ComputedExpression
      extended bynet.sf.saxon.expr.SingleNodeExpression
          extended bynet.sf.saxon.expr.ParentNodeExpression
All Implemented Interfaces:
Container, Expression, InstructionInfoProvider, java.io.Serializable, javax.xml.transform.SourceLocator

public class ParentNodeExpression
extends SingleNodeExpression

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.expr.ComputedExpression
locationId, staticProperties
 
Fields inherited from interface net.sf.saxon.expr.Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
 
Constructor Summary
ParentNodeExpression()
           
 
Method Summary
 void display(int level, NamePool pool, java.io.PrintStream out)
          Diagnostic print of expression structure
 boolean equals(java.lang.Object other)
          Is this expression the same as another expression?
 NodeInfo getNode(XPathContext context)
          Return the node selected by this SingleNodeExpression
 int hashCode()
          get HashCode for comparing two expressions
 
Methods inherited from class net.sf.saxon.expr.SingleNodeExpression
computeCardinality, computeSpecialProperties, effectiveBooleanValue, evaluateItem, getIntrinsicDependencies, getItemType, iterate, optimize, typeCheck
 
Methods inherited from class net.sf.saxon.expr.ComputedExpression
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, dynamicError, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterateSubExpressions, markTailFunctionCalls, process, promote, resetStaticProperties, setLocationId, setParentExpression, simplify, suppressValidation, typeError, typeError
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParentNodeExpression

public ParentNodeExpression()
Method Detail

getNode

public NodeInfo getNode(XPathContext context)
                 throws XPathException
Return the node selected by this SingleNodeExpression

Specified by:
getNode in class SingleNodeExpression
Parameters:
context - The context for the evaluation
Returns:
the parent of the current node defined by the context
Throws:
XPathException

equals

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


hashCode

public int hashCode()
get HashCode for comparing two expressions


display

public void display(int level,
                    NamePool pool,
                    java.io.PrintStream out)
Diagnostic print of expression structure

Parameters:
level - indentation level for this expression
pool - NamePool used to expand any names appearing in the expression
out - Output destination