org.apache.commons.jxpath.ri.axes
Class SimplePathInterpreter

java.lang.Object
  |
  +--org.apache.commons.jxpath.ri.axes.SimplePathInterpreter

public class SimplePathInterpreter
extends java.lang.Object

An evaluation mechanism for simple XPaths, which is much faster than the usual process. It is only used for xpaths which have no context-dependent parts, consist entirely of child::name and self::node() steps with predicates that either integer or have the form [@name = ...].

Version:
$Revision: 1.10 $ $Date: 2002/04/24 04:05:40 $
Author:
Dmitri Plotnikov

Constructor Summary
SimplePathInterpreter()
           
 
Method Summary
static NodePointer interpretSimpleExpressionPath(EvalContext context, NodePointer root, Expression[] predicates, Step[] steps)
          Interpret the steps of a simple expression path that starts with the given root, which is the result of evaluation of the root expression of the expression path, applies the given predicates to it and then follows the given steps.
static NodePointer interpretSimpleLocationPath(EvalContext context, NodePointer root, Step[] steps)
          Interpret a simple path that starts with the given root and follows the given steps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePathInterpreter

public SimplePathInterpreter()
Method Detail

interpretSimpleLocationPath

public static NodePointer interpretSimpleLocationPath(EvalContext context,
                                                      NodePointer root,
                                                      Step[] steps)
Interpret a simple path that starts with the given root and follows the given steps. All steps must have the axis "child::" and a name test. They can also optionally have predicates of type [@name=expression] or simply [expression] interpreted as an index.

interpretSimpleExpressionPath

public static NodePointer interpretSimpleExpressionPath(EvalContext context,
                                                        NodePointer root,
                                                        Expression[] predicates,
                                                        Step[] steps)
Interpret the steps of a simple expression path that starts with the given root, which is the result of evaluation of the root expression of the expression path, applies the given predicates to it and then follows the given steps. All steps must have the axis "child::" or "attribute::" and a name test. They can also optionally have predicates of type [@name=...] or simply [...] interpreted as an index.


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.