com.novell.xml.xpath
Class AbsoluteLocationPath

java.lang.Object
  extended bycom.novell.xml.xpath.NodeSetExpr
      extended bycom.novell.xml.xpath.AbsoluteLocationPath
All Implemented Interfaces:
Expression

public class AbsoluteLocationPath
extends NodeSetExpr
implements Expression

Class representing an XPath AbsoluteExpressionPath. An AbsoluteExpressionPath is composed of a root selector '/' and an optional RelativeLocationPath.

See Also:
RelativeLocationPath

Constructor Summary
AbsoluteLocationPath()
          Construct an AbsoluteLocationPath with no RelativeLocationPath (i.e., just '/')
AbsoluteLocationPath(RelativeLocationPath rlp)
          Construct an AbsoluteLocationPath with a RelativeLocationPath (i.e., '/' followed by a RelativeLocationPath)
 
Method Summary
 ExpressionValue evaluate(Node contextNode, ExpressionContext context)
          Evaluate this RelativeLocationPath with respect to a context node and expression context.
 void registerForReset(XPathResetRegistrar registrar)
          Register this expression or any subexpression that implements XPathResetCache with an object that wants to call resetCache()
 String toString()
          Provide a readable description for debugging.
 
Methods inherited from class com.novell.xml.xpath.NodeSetExpr
dump, getResultType, isConstant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.novell.xml.xpath.Expression
dump, getResultType, isConstant
 

Constructor Detail

AbsoluteLocationPath

public AbsoluteLocationPath()
Construct an AbsoluteLocationPath with no RelativeLocationPath (i.e., just '/')


AbsoluteLocationPath

public AbsoluteLocationPath(RelativeLocationPath rlp)
Construct an AbsoluteLocationPath with a RelativeLocationPath (i.e., '/' followed by a RelativeLocationPath)

Parameters:
rlp - The RelativeLocationPath
Method Detail

toString

public String toString()
Provide a readable description for debugging.

Returns:
String representation

evaluate

public ExpressionValue evaluate(Node contextNode,
                                ExpressionContext context)
                         throws XPathEvaluationException
Evaluate this RelativeLocationPath with respect to a context node and expression context. The result is always a NodeSet

Specified by:
evaluate in interface Expression
Parameters:
contextNode - The context node
context - The expression context
Returns:
The resulting NodeSet (may be empty, will never be null)
Throws:
XPathEvaluationException

registerForReset

public void registerForReset(XPathResetRegistrar registrar)
Register this expression or any subexpression that implements XPathResetCache with an object that wants to call resetCache()

Specified by:
registerForReset in interface Expression
Overrides:
registerForReset in class NodeSetExpr