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
Modifier and TypeMethodDescriptionvoidReceive notification of the end of an absolute location path expression.voidendAdditiveExpr(int additiveOperator) Receive notification of the end of an additive ('+' or '-') expression.voidReceive notification of the end of a node() step.voidendAndExpr(boolean create) Receive notification of the end of an 'and' expression.voidReceive notification of the end of a comment() step.voidendEqualityExpr(int equalityOperator) Receive notification of the end of an equality ('=' or '!=') expression.voidReceive notification of the end of a filter expression.voidReceive notification of the end of a function call.voidendMultiplicativeExpr(int multiplicativeOperator) Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.voidReceive notification of the end of a NameStepvoidendOrExpr(boolean create) Receive notification of the end of an 'or' expression.voidReceive notification of the end of a path expression.voidReceive notification of the end of a predicate.voidReceive notification of the end of a processing-instruction(...) step.voidendRelationalExpr(int relationalOperator) Receive notification of the start of a relational ('invalid input: '<'', '>', 'invalid input: '<'=', or '>=') expression.voidReceive notification of the end of a relative location path expression.voidReceive notification of the end of a text() step.voidendUnaryExpr(int unaryOperator) Receive notification of the end of a unary ('+' or '-') expression.voidendUnionExpr(boolean create) Receive notification of the end of a union ('|') expression.voidendXPath()Receive notification of the end of an XPath expression parse.voidReceive notification of a literal expression.voidnumber(double number) Receive notification of a number expression.voidnumber(int number) Receive notification of a number expression.voidReceive notification of the start of an absolute location path expression.voidReceive notification of the start of an additive ('+' or '-') expression.voidstartAllNodeStep(int axis) Receive notification of the start of a node() step.voidReceive notification of the start of an 'and' expression.voidstartCommentNodeStep(int axis) Receive notification of the start of a comment() step.voidReceive notification of the start of an equality ('=' or '!=') expression.voidReceive notification of the start of a filter expression.voidstartFunction(String prefix, String functionName) Receive notification of a function call.voidReceive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.voidstartNameStep(int axis, String prefix, String localName) Receive notification of the start of a name step.voidReceive notification of the start of an 'or' expression.voidReceive notification of the start of a path expression.voidReceive notification of the start of a predicate.voidstartProcessingInstructionNodeStep(int axis, String name) Receive notification of the start of a processing-instruction(...) step.voidReceive notification of the start of a relational ('invalid input: '<'', '>', 'invalid input: '<'=', or '>=') expression.voidReceive notification of the start of a relative location path expression.voidstartTextNodeStep(int axis) Receive notification of the start of a text() step.voidReceive notification of the start of a unary ('+' or '-') expression.voidReceive notification of the start of a union ('|') expression.voidReceive notification of the start of an XPath expression parse.voidvariableReference(String prefix, String variableName) Receive notification of a variable-reference expression.
-
Method Details
-
startXPath
Receive notification of the start of an XPath expression parse.- Throws:
SAXPathException
-
endXPath
Receive notification of the end of an XPath expression parse.- Throws:
SAXPathException
-
startPathExpr
Receive notification of the start of a path expression.- Throws:
SAXPathException
-
endPathExpr
Receive notification of the end of a path expression.- Throws:
SAXPathException
-
startAbsoluteLocationPath
Receive notification of the start of an absolute location path expression.- Throws:
SAXPathException
-
endAbsoluteLocationPath
Receive notification of the end of an absolute location path expression.- Throws:
SAXPathException
-
startRelativeLocationPath
Receive notification of the start of a relative location path expression.- Throws:
SAXPathException
-
endRelativeLocationPath
Receive notification of the end of a relative location path expression.- Throws:
SAXPathException
-
startNameStep
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.- Throws:
SAXPathException
-
endNameStep
Receive notification of the end of a NameStep- Throws:
SAXPathException
-
startTextNodeStep
Receive notification of the start of a text() step.- Parameters:
axis- The axis of this step.- Throws:
SAXPathException
-
endTextNodeStep
Receive notification of the end of a text() step.- Throws:
SAXPathException
-
startCommentNodeStep
Receive notification of the start of a comment() step.- Parameters:
axis- The axis of this step.- Throws:
SAXPathException
-
endCommentNodeStep
Receive notification of the end of a comment() step.- Throws:
SAXPathException
-
startAllNodeStep
Receive notification of the start of a node() step.- Parameters:
axis- The axis of this step.- Throws:
SAXPathException
-
endAllNodeStep
Receive notification of the end of a node() step.- Throws:
SAXPathException
-
startProcessingInstructionNodeStep
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.- Throws:
SAXPathException
-
endProcessingInstructionNodeStep
Receive notification of the end of a processing-instruction(...) step.- Throws:
SAXPathException
-
startPredicate
Receive notification of the start of a predicate.- Throws:
SAXPathException
-
endPredicate
Receive notification of the end of a predicate.- Throws:
SAXPathException
-
startFilterExpr
Receive notification of the start of a filter expression.- Throws:
SAXPathException
-
endFilterExpr
Receive notification of the end of a filter expression.- Throws:
SAXPathException
-
startOrExpr
Receive notification of the start of an 'or' expression.- Throws:
SAXPathException
-
endOrExpr
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.- Throws:
SAXPathException
-
startAndExpr
Receive notification of the start of an 'and' expression.- Throws:
SAXPathException
-
endAndExpr
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.- Throws:
SAXPathException
-
startEqualityExpr
Receive notification of the start of an equality ('=' or '!=') expression.- Throws:
SAXPathException
-
endEqualityExpr
Receive notification of the end of an equality ('=' or '!=') expression.- Parameters:
operator- The operator specific to this particular equality expression. If null, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startRelationalExpr
Receive notification of the start of a relational ('invalid input: '<'', '>', 'invalid input: '<'=', or '>=') expression.- Throws:
SAXPathException
-
endRelationalExpr
Receive notification of the start of a relational ('invalid input: '<'', '>', 'invalid input: '<'=', or '>=') expression.- Parameters:
operator- The operator specific to this particular relational expression. If null, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startAdditiveExpr
Receive notification of the start of an additive ('+' or '-') expression.- Throws:
SAXPathException
-
endAdditiveExpr
Receive notification of the end of an additive ('+' or '-') expression.- Parameters:
operator- The operator specific to this particular additive expression. If null, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startMultiplicativeExpr
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.- Throws:
SAXPathException
-
endMultiplicativeExpr
Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.- Parameters:
operator- The operator specific to this particular multiplicative expression. If null, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startUnaryExpr
Receive notification of the start of a unary ('+' or '-') expression.- Throws:
SAXPathException
-
endUnaryExpr
Receive notification of the end of a unary ('+' or '-') expression.- Parameters:
operator- The operator specific to this particular unary expression. If null, this expression is only a pass-through, and should not actually be instantiated. If notOperator.NO_OP, it'll always beOperator.NEGATIVE.- Throws:
SAXPathException
-
startUnionExpr
Receive notification of the start of a union ('|') expression.- Throws:
SAXPathException
-
endUnionExpr
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.- Throws:
SAXPathException
-
number
Receive notification of a number expression.- Parameters:
number- The number value.- Throws:
SAXPathException
-
number
Receive notification of a number expression.- Parameters:
number- The number value.- Throws:
SAXPathException
-
literal
Receive notification of a literal expression.- Parameters:
literal- The string literal value.- Throws:
SAXPathException
-
variableReference
Receive notification of a variable-reference expression.- Parameters:
prefix- The ns-uri prefix of the variable.variableName- The name of the variable.- Throws:
SAXPathException
-
startFunction
Receive notification of a function call.- Parameters:
prefix- The ns-uri prefix of the function.functionName- The name of the function.- Throws:
SAXPathException
-
endFunction
Receive notification of the end of a function call.- Throws:
SAXPathException
-