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 simple XPath evaluation mechanism, which works only for some xpaths but is much faster than the usual process. It is only used for xpaths which have no context-dependent parts, consist entirely of child:: 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 interpretPath(EvalContext context, NodePointer parentPointer, Step[] steps)
          Walks a location path in a highly simplified fashion: from pointer to pointer, no contexts.
static NodePointer interpretPredicates(EvalContext context, NodePointer pointer, Expression[] predicates)
          Interprets predicates for the root expression of an Expression Path without creating any intermediate contexts.
 
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

interpretPath

public static NodePointer interpretPath(EvalContext context,
                                        NodePointer parentPointer,
                                        Step[] steps)
Walks a location path in a highly simplified fashion: from pointer to pointer, no contexts. This is only possible if the path consists of simple steps like "/foo[3]" and is context-independent.


interpretPredicates

public static NodePointer interpretPredicates(EvalContext context,
                                              NodePointer pointer,
                                              Expression[] predicates)
Interprets predicates for the root expression of an Expression Path without creating any intermediate contexts. This is an option used for optimization when the path has a simple structure and predicates are context-independent.



Copyright (c) 2001 - Apache Software Foundation