org.saxpath
Interface XPathHandler

All Known Implementing Classes:
ConformanceXPathHandler

public interface XPathHandler

Interface for event-based XPath parsing.

A XPathReader generates callbacks into an XPathHandler to allow for custom handling of the parse.

The callbacks very closely match the productions listed in the W3C XPath specification. Gratuitous productions (ie, Expr/startExpr()/endExpr())are not included in this API.

Author:
bob mcwhirter (bob@werken.com)

Method Summary
 void endAbsoluteLocationPath()
          Receive notification of the end of an absolute location path expression.
 void endAdditiveExpr(int additiveOperator)
          Receive notification of the end of an additive ('+' or '-') expression.
 void endAllNodeStep()
          Receive notification of the end of a node() step.
 void endAndExpr(boolean create)
          Receive notification of the end of an 'and' expression.
 void endCommentNodeStep()
          Receive notification of the end of a comment() step.
 void endEqualityExpr(int equalityOperator)
          Receive notification of the end of an equality ('=' or '!
 void endFilterExpr()
          Receive notification of the end of a filter expression.
 void endFunction()
          Receive notification of the end of a function call.
 void endMultiplicativeExpr(int multiplicativeOperator)
          Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.
 void endNameStep()
          Receive notification of the end of a NameStep
 void endOrExpr(boolean create)
          Receive notification of the end of an 'or' expression.
 void endPathExpr()
          Receive notification of the end of a path expression.
 void endPredicate()
          Receive notification of the end of a predicate.
 void endProcessingInstructionNodeStep()
          Receive notification of the end of a processing-instruction(...) step.
 void endRelationalExpr(int relationalOperator)
          Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.
 void endRelativeLocationPath()
          Receive notification of the end of a relative location path expression.
 void endTextNodeStep()
          Receive notification of the end of a text() step.
 void endUnaryExpr(int unaryOperator)
          Receive notification of the end of a unary ('+' or '-') expression.
 void endUnionExpr(boolean create)
          Receive notification of the end of a union ('|') expression.
 void endXPath()
          Receive notification of the end of an XPath expression parse.
 void literal(java.lang.String literal)
          Receive notification of a literal expression.
 void number(double number)
          Receive notification of a number expression.
 void number(int number)
          Receive notification of a number expression.
 void startAbsoluteLocationPath()
          Receive notification of the start of an absolute location path expression.
 void startAdditiveExpr()
          Receive notification of the start of an additive ('+' or '-') expression.
 void startAllNodeStep(int axis)
          Receive notification of the start of a node() step.
 void startAndExpr()
          Receive notification of the start of an 'and' expression.
 void startCommentNodeStep(int axis)
          Receive notification of the start of a comment() step.
 void startEqualityExpr()
          Receive notification of the start of an equality ('=' or '!
 void startFilterExpr()
          Receive notification of the start of a filter expression.
 void startFunction(java.lang.String prefix, java.lang.String functionName)
          Receive notification of a function call.
 void startMultiplicativeExpr()
          Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.
 void startNameStep(int axis, java.lang.String prefix, java.lang.String localName)
          Receive notification of the start of a name step.
 void startOrExpr()
          Receive notification of the start of an 'or' expression.
 void startPathExpr()
          Receive notification of the start of a path expression.
 void startPredicate()
          Receive notification of the start of a predicate.
 void startProcessingInstructionNodeStep(int axis, java.lang.String name)
          Receive notification of the start of a processing-instruction(...) step.
 void startRelationalExpr()
          Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.
 void startRelativeLocationPath()
          Receive notification of the start of a relative location path expression.
 void startTextNodeStep(int axis)
          Receive notification of the start of a text() step.
 void startUnaryExpr()
          Receive notification of the start of a unary ('+' or '-') expression.
 void startUnionExpr()
          Receive notification of the start of a union ('|') expression.
 void startXPath()
          Receive notification of the start of an XPath expression parse.
 void variableReference(java.lang.String prefix, java.lang.String variableName)
          Receive notification of a variable-reference expression.
 

Method Detail

startXPath

public void startXPath()
                throws SAXPathException
Receive notification of the start of an XPath expression parse.

SAXPathException

endXPath

public void endXPath()
              throws SAXPathException
Receive notification of the end of an XPath expression parse.

SAXPathException

startPathExpr

public void startPathExpr()
                   throws SAXPathException
Receive notification of the start of a path expression.

SAXPathException

endPathExpr

public void endPathExpr()
                 throws SAXPathException
Receive notification of the end of a path expression.

SAXPathException

startAbsoluteLocationPath

public void startAbsoluteLocationPath()
                               throws SAXPathException
Receive notification of the start of an absolute location path expression.

SAXPathException

endAbsoluteLocationPath

public void endAbsoluteLocationPath()
                             throws SAXPathException
Receive notification of the end of an absolute location path expression.

SAXPathException

startRelativeLocationPath

public void startRelativeLocationPath()
                               throws SAXPathException
Receive notification of the start of a relative location path expression.

SAXPathException

endRelativeLocationPath

public void endRelativeLocationPath()
                             throws SAXPathException
Receive notification of the end of a relative location path expression.

SAXPathException

startNameStep

public void startNameStep(int axis,
                          java.lang.String prefix,
                          java.lang.String localName)
                   throws SAXPathException
Receive notification of the start of a name step.

Parameters:
axis - The axis of this step.
prefix - The namespace prefix for the name to test, or the empty-string if no prefix is specified.
localName - The local part of the name to test.
SAXPathException

endNameStep

public void endNameStep()
                 throws SAXPathException
Receive notification of the end of a NameStep

SAXPathException

startTextNodeStep

public void startTextNodeStep(int axis)
                       throws SAXPathException
Receive notification of the start of a text() step.

Parameters:
axis - The axis of this step.
SAXPathException

endTextNodeStep

public void endTextNodeStep()
                     throws SAXPathException
Receive notification of the end of a text() step.

SAXPathException

startCommentNodeStep

public void startCommentNodeStep(int axis)
                          throws SAXPathException
Receive notification of the start of a comment() step.

Parameters:
axis - The axis of this step.
SAXPathException

endCommentNodeStep

public void endCommentNodeStep()
                        throws SAXPathException
Receive notification of the end of a comment() step.

SAXPathException

startAllNodeStep

public void startAllNodeStep(int axis)
                      throws SAXPathException
Receive notification of the start of a node() step.

Parameters:
axis - The axis of this step.
SAXPathException

endAllNodeStep

public void endAllNodeStep()
                    throws SAXPathException
Receive notification of the end of a node() step.

SAXPathException

startProcessingInstructionNodeStep

public void startProcessingInstructionNodeStep(int axis,
                                               java.lang.String name)
                                        throws SAXPathException
Receive notification of the start of a processing-instruction(...) step.

Parameters:
axis - The axis of this step.
name - The name of the processing-instruction, of the empty-string if none is specified.
SAXPathException

endProcessingInstructionNodeStep

public void endProcessingInstructionNodeStep()
                                      throws SAXPathException
Receive notification of the end of a processing-instruction(...) step.

SAXPathException

startPredicate

public void startPredicate()
                    throws SAXPathException
Receive notification of the start of a predicate.

SAXPathException

endPredicate

public void endPredicate()
                  throws SAXPathException
Receive notification of the end of a predicate.

SAXPathException

startFilterExpr

public void startFilterExpr()
                     throws SAXPathException
Receive notification of the start of a filter expression.

SAXPathException

endFilterExpr

public void endFilterExpr()
                   throws SAXPathException
Receive notification of the end of a filter expression.

SAXPathException

startOrExpr

public void startOrExpr()
                 throws SAXPathException
Receive notification of the start of an 'or' expression.

SAXPathException

endOrExpr

public void endOrExpr(boolean create)
               throws SAXPathException
Receive notification of the end of an 'or' expression.

Parameters:
create - Flag that indicates if this expression should truly be instantiated, or if it was just a pass-through, based upon the grammar productions.
SAXPathException

startAndExpr

public void startAndExpr()
                  throws SAXPathException
Receive notification of the start of an 'and' expression.

SAXPathException

endAndExpr

public void endAndExpr(boolean create)
                throws SAXPathException
Receive notification of the end of an 'and' expression.

Parameters:
create - Flag that indicates if this expression should truly be instantiated, or if it was just a pass-through, based upon the grammar productions.
SAXPathException

startEqualityExpr

public void startEqualityExpr()
                       throws SAXPathException
Receive notification of the start of an equality ('=' or '!=') expression.

SAXPathException

endEqualityExpr

public void endEqualityExpr(int equalityOperator)
                     throws SAXPathException
Receive notification of the end of an equality ('=' or '!=') expression.

SAXPathException

startRelationalExpr

public void startRelationalExpr()
                         throws SAXPathException
Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.

SAXPathException

endRelationalExpr

public void endRelationalExpr(int relationalOperator)
                       throws SAXPathException
Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.

SAXPathException

startAdditiveExpr

public void startAdditiveExpr()
                       throws SAXPathException
Receive notification of the start of an additive ('+' or '-') expression.

SAXPathException

endAdditiveExpr

public void endAdditiveExpr(int additiveOperator)
                     throws SAXPathException
Receive notification of the end of an additive ('+' or '-') expression.

SAXPathException

startMultiplicativeExpr

public void startMultiplicativeExpr()
                             throws SAXPathException
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.

SAXPathException

endMultiplicativeExpr

public void endMultiplicativeExpr(int multiplicativeOperator)
                           throws SAXPathException
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.

SAXPathException

startUnaryExpr

public void startUnaryExpr()
                    throws SAXPathException
Receive notification of the start of a unary ('+' or '-') expression.

SAXPathException

endUnaryExpr

public void endUnaryExpr(int unaryOperator)
                  throws SAXPathException
Receive notification of the end of a unary ('+' or '-') expression.

SAXPathException

startUnionExpr

public void startUnionExpr()
                    throws SAXPathException
Receive notification of the start of a union ('|') expression.

SAXPathException

endUnionExpr

public void endUnionExpr(boolean create)
                  throws SAXPathException
Receive notification of the end of a union ('|') expression.

Parameters:
create - Flag that indicates if this expression should truly be instantiated, or if it was just a pass-through, based upon the grammar productions.
SAXPathException

number

public void number(int number)
            throws SAXPathException
Receive notification of a number expression.

Parameters:
number - The number value.
SAXPathException

number

public void number(double number)
            throws SAXPathException
Receive notification of a number expression.

Parameters:
number - The number value.
SAXPathException

literal

public void literal(java.lang.String literal)
             throws SAXPathException
Receive notification of a literal expression.

Parameters:
literal - The string literal value.
SAXPathException

variableReference

public void variableReference(java.lang.String prefix,
                              java.lang.String variableName)
                       throws SAXPathException
Receive notification of a variable-reference expression.

Parameters:
prefix - The ns-uri prefix of the variable.
variableName - The name of the variable.
SAXPathException

startFunction

public void startFunction(java.lang.String prefix,
                          java.lang.String functionName)
                   throws SAXPathException
Receive notification of a function call.

Parameters:
prefix - The ns-uri prefix of the function.
functionName - The name of the function.
SAXPathException

endFunction

public void endFunction()
                 throws SAXPathException
Receive notification of the end of a function call.

SAXPathException


Copyright © 2001 bob mcwhirter & James Strachan. All Rights Reserved. Hosted by

SourceForge Logo