com.novell.xml.dom
Class DOMEvaluator

java.lang.Object
  extended bycom.novell.xml.dom.DOMEvaluator
All Implemented Interfaces:
XPathResetRegistrar

public class DOMEvaluator
extends Object
implements XPathResetRegistrar

A class that uses XPath expressions to find nodes in a DOM tree


Constructor Summary
DOMEvaluator(String expression, NamespaceContext nsContext, ClassLoader loader, VariableBindings varBindings, Map properties)
          Create a DOMEvaluator based on the passed expression.
DOMEvaluator(String expression, Node nsNode, ClassLoader loader, VariableBindings varBindings, Map properties)
          Create a DOMEvaluator based on the passed expression.
 
Method Summary
 ExpressionValue evaluate(Node node)
          Evaluate the DOMEvaluator expression
 void registerResetCache(XPathResetCache reset)
          Register an instance of XPathResetCache so it will be called when the source document changes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMEvaluator

public DOMEvaluator(String expression,
                    Node nsNode,
                    ClassLoader loader,
                    VariableBindings varBindings,
                    Map properties)
             throws IllegalArgumentException
Create a DOMEvaluator based on the passed expression. The passed node is used to resolve any namespace-qualified names in the expression.

Parameters:
expression - The string form of the expression for this query.
nsNode - The node to be used to resolve namespace-qualified names.
loader - ClassLoader instance to use to load extension functions (null for default).
varBindings - VariableBindings instance used to resolve variables.
properties - Map instance that contains extended properties (may be null)
Throws:
IllegalArgumentException - If the expression is not syntactically correct or if the expression does not result in a node-set.

DOMEvaluator

public DOMEvaluator(String expression,
                    NamespaceContext nsContext,
                    ClassLoader loader,
                    VariableBindings varBindings,
                    Map properties)
             throws IllegalArgumentException
Create a DOMEvaluator based on the passed expression. The passed NamespaceContext is used to resolve any namespace-qualified names in the expression.

Parameters:
expression - The string form of the expression for this query.
nsContext - The namespace context to be used to resolve namespace-
loader - ClassLoader instance to use to load extension functions (null for default).
varBindings - VariableBindings instance used to resolve variables. qualified names.
properties - Map instance that contains extended properties (may be null)
Throws:
IllegalArgumentException - If the expression is not syntactically correct or if the expression does not result in a node-set.
Method Detail

evaluate

public ExpressionValue evaluate(Node node)
                         throws XPathEvaluationException
Evaluate the DOMEvaluator expression

Parameters:
node - The context node for evaluation of the query
Returns:
The resulting ExpressionValue
Throws:
XPathEvaluationException - Thrown if there is an error during the evaluation of the expression.

registerResetCache

public void registerResetCache(XPathResetCache reset)
Register an instance of XPathResetCache so it will be called when the source document changes

Specified by:
registerResetCache in interface XPathResetRegistrar
Parameters:
reset - The object implementing XPathResetCache