com.japisoft.xpath
Interface XPathResolver

All Known Implementing Classes:
DebugXPathResolver, TreeXPathResolver

public interface XPathResolver

Interface for resolving XPath expression. This interface receive events from the parsing engine and build a nodeSet as an XPath result.

Author:
2002-2003 (c) JAPISOFT
See Also:
XPathContext

Field Summary
static java.lang.String ABBREVIATED_ANCESTOR
           
static java.lang.String ABBREVIATED_ATTRIBUTE
           
static java.lang.String ABBREVIATED_DESCENDANT
           
static java.lang.String ABBREVIATED_NAMETEST
           
static java.lang.String ABBREVIATED_SELF
           
static int ADD
          + operator
static int AND
          and operator
static int DIV
          div operator
static int EQUAL
          = operator
static int INF
          < operator
static int INFE
          <= operator
static int MINUS
          - operator
static int MOD
          mod operator
static int NOT_EQUAL
          !
static int OR
          or operator
static int STAR
          operator
static int SUP
          > operator
static int SUPE
          >= operator
static int UNION
          union operator
 
Method Summary
 void abbreviatedAxis(java.lang.String axisName)
          '
 void axis(java.lang.String axisName)
          Reset the current axis : ancestor, ancestor-or-self, attribute, child, descendant, descendant-or-self, following, following-sibling, namespace parent, preceding, preceding-sibling, self.
 void binaryOperator(int type)
          Evaluate the current predicate with binary operator
 void binaryOperator(java.lang.String opExt)
          Evaluate the current predicate with this binary operator
 void functionName(java.lang.String qname)
          Current function name
 AbstractNode getRootParsedNode()
          At the end of the parsing process, this value contains the result set
 void literal(java.lang.String literal)
          Current literal
 void nameTest(java.lang.String nameTest, java.lang.String namespacePrefix)
          Reset the nameTest after the axis name.
 void nextExpression()
          Next expression for the predicate
 void nextFunction()
          Evaluate the current function
 void nextLocationPath()
          Prepare the current nodeSet
 void nextParam()
          Add a parameter
 void nextPredicate()
          Prepare the current nodeSet
 void nodeType(java.lang.String nodeType)
          Reset the nodeType : comment , text , processing-instruction , node
 void number(java.lang.String number)
          Current number
 void processingInstruction(java.lang.String name, java.lang.String argument)
          Reset the processing instruction after the axis name
 void root()
          Select the root node
 void unaryOperator(int type)
          Evaluate the current predicate expression with an unary operator
 void variable(java.lang.String name)
          Evaluate the current variable
 

Field Detail

ABBREVIATED_SELF

public static final java.lang.String ABBREVIATED_SELF
See Also:
Constant Field Values

ABBREVIATED_ANCESTOR

public static final java.lang.String ABBREVIATED_ANCESTOR
See Also:
Constant Field Values

ABBREVIATED_DESCENDANT

public static final java.lang.String ABBREVIATED_DESCENDANT
See Also:
Constant Field Values

ABBREVIATED_ATTRIBUTE

public static final java.lang.String ABBREVIATED_ATTRIBUTE
See Also:
Constant Field Values

ABBREVIATED_NAMETEST

public static final java.lang.String ABBREVIATED_NAMETEST
See Also:
Constant Field Values

OR

public static final int OR
or operator

See Also:
Constant Field Values

AND

public static final int AND
and operator

See Also:
Constant Field Values

EQUAL

public static final int EQUAL
= operator

See Also:
Constant Field Values

NOT_EQUAL

public static final int NOT_EQUAL
!= operator

See Also:
Constant Field Values

INF

public static final int INF
< operator

See Also:
Constant Field Values

SUP

public static final int SUP
> operator

See Also:
Constant Field Values

INFE

public static final int INFE
<= operator

See Also:
Constant Field Values

SUPE

public static final int SUPE
>= operator

See Also:
Constant Field Values

ADD

public static final int ADD
+ operator

See Also:
Constant Field Values

MINUS

public static final int MINUS
- operator

See Also:
Constant Field Values

STAR

public static final int STAR
operator

See Also:
Constant Field Values

DIV

public static final int DIV
div operator

See Also:
Constant Field Values

MOD

public static final int MOD
mod operator

See Also:
Constant Field Values

UNION

public static final int UNION
union operator

See Also:
Constant Field Values
Method Detail

getRootParsedNode

public AbstractNode getRootParsedNode()
At the end of the parsing process, this value contains the result set

Returns:
the current node set

root

public void root()
Select the root node


nextLocationPath

public void nextLocationPath()
Prepare the current nodeSet


nextPredicate

public void nextPredicate()
Prepare the current nodeSet


nextExpression

public void nextExpression()
Next expression for the predicate


axis

public void axis(java.lang.String axisName)
Reset the current axis : ancestor, ancestor-or-self, attribute, child, descendant, descendant-or-self, following, following-sibling, namespace parent, preceding, preceding-sibling, self.


abbreviatedAxis

public void abbreviatedAxis(java.lang.String axisName)
'.', '..', '//'


nameTest

public void nameTest(java.lang.String nameTest,
                     java.lang.String namespacePrefix)
Reset the nameTest after the axis name. Can be '*'


processingInstruction

public void processingInstruction(java.lang.String name,
                                  java.lang.String argument)
Reset the processing instruction after the axis name

Parameters:
name - Processing instruction
argument - Argument for the processing instruction, can be null

nodeType

public void nodeType(java.lang.String nodeType)
Reset the nodeType : comment , text , processing-instruction , node


binaryOperator

public void binaryOperator(int type)
Evaluate the current predicate with binary operator


binaryOperator

public void binaryOperator(java.lang.String opExt)
Evaluate the current predicate with this binary operator

Parameters:
opExt - can be equal to 'div' or 'mod'

unaryOperator

public void unaryOperator(int type)
Evaluate the current predicate expression with an unary operator


variable

public void variable(java.lang.String name)
Evaluate the current variable


literal

public void literal(java.lang.String literal)
Current literal


number

public void number(java.lang.String number)
Current number


functionName

public void functionName(java.lang.String qname)
Current function name


nextParam

public void nextParam()
Add a parameter


nextFunction

public void nextFunction()
Evaluate the current function