Package org.jaxen.saxpath
Interface XPathHandler
-
- All Known Implementing Classes:
JaxenHandler,PatternHandler
public interface XPathHandlerInterface for event-based XPath parsing.A
XPathReadergenerates callbacks into anXPathHandlerto allow for custom handling of the parse.The callbacks very closely match the productions listed in the W3C XPath specification. Gratuitous productions (e.g. Expr/startExpr()/endExpr()) are not included in this API.
- Author:
- bob mcwhirter (bob@werken.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidendAbsoluteLocationPath()Receive notification of the end of an absolute location path expression.voidendAdditiveExpr(int additiveOperator)Receive notification of the end of an additive ('+' or '-') expression.voidendAllNodeStep()Receive notification of the end of a node() step.voidendAndExpr(boolean create)Receive notification of the end of an 'and' expression.voidendCommentNodeStep()Receive notification of the end of a comment() step.voidendEqualityExpr(int equalityOperator)Receive notification of the end of an equality ('=' or '!=') expression.voidendFilterExpr()Receive notification of the end of a filter expression.voidendFunction()Receive notification of the end of a function callvoidendMultiplicativeExpr(int multiplicativeOperator)Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.voidendNameStep()Receive notification of the end of a NameStepvoidendOrExpr(boolean create)Receive notification of the end of an 'or' expression.voidendPathExpr()Receive notification of the end of a path expression.voidendPredicate()Receive notification of the end of a predicate.voidendProcessingInstructionNodeStep()Receive notification of the end of a processing-instruction(...) step.voidendRelationalExpr(int relationalOperator)Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.voidendRelativeLocationPath()Receive notification of the end of a relative location path expression.voidendTextNodeStep()Receive 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.voidliteral(java.lang.String literal)Receive notification of a literal expression.voidnumber(double number)Receive notification of a number expression.voidnumber(int number)Receive notification of a number expression.voidstartAbsoluteLocationPath()Receive notification of the start of an absolute location path expression.voidstartAdditiveExpr()Receive notification of the start of an additive ('+' or '-') expression.voidstartAllNodeStep(int axis)Receive notification of the start of a node() step.voidstartAndExpr()Receive notification of the start of an 'and' expression.voidstartCommentNodeStep(int axis)Receive notification of the start of a comment() step.voidstartEqualityExpr()Receive notification of the start of an equality ('=' or '!=') expression.voidstartFilterExpr()Receive notification of the start of a filter expression.voidstartFunction(java.lang.String prefix, java.lang.String functionName)Receive notification of a function call.voidstartMultiplicativeExpr()Receive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.voidstartNameStep(int axis, java.lang.String prefix, java.lang.String localName)Receive notification of the start of a name step.voidstartOrExpr()Receive notification of the start of an 'or' expression.voidstartPathExpr()Receive notification of the start of a path expression.voidstartPredicate()Receive notification of the start of a predicate.voidstartProcessingInstructionNodeStep(int axis, java.lang.String name)Receive notification of the start of a processing-instruction(...) step.voidstartRelationalExpr()Receive notification of the start of a relational ('<', '>', '<=', or '>=') expression.voidstartRelativeLocationPath()Receive notification of the start of a relative location path expression.voidstartTextNodeStep(int axis)Receive notification of the start of a text() step.voidstartUnaryExpr()Receive notification of the start of a unary ('+' or '-') expression.voidstartUnionExpr()Receive notification of the start of a union ('|') expression.voidstartXPath()Receive notification of the start of an XPath expression parse.voidvariableReference(java.lang.String prefix, java.lang.String variableName)Receive notification of a variable-reference expression.
-
-
-
Method Detail
-
startXPath
void startXPath() throws SAXPathExceptionReceive notification of the start of an XPath expression parse.- Throws:
SAXPathException
-
endXPath
void endXPath() throws SAXPathExceptionReceive notification of the end of an XPath expression parse.- Throws:
SAXPathException
-
startPathExpr
void startPathExpr() throws SAXPathExceptionReceive notification of the start of a path expression.- Throws:
SAXPathException
-
endPathExpr
void endPathExpr() throws SAXPathExceptionReceive notification of the end of a path expression.- Throws:
SAXPathException
-
startAbsoluteLocationPath
void startAbsoluteLocationPath() throws SAXPathExceptionReceive notification of the start of an absolute location path expression.- Throws:
SAXPathException
-
endAbsoluteLocationPath
void endAbsoluteLocationPath() throws SAXPathExceptionReceive notification of the end of an absolute location path expression.- Throws:
SAXPathException
-
startRelativeLocationPath
void startRelativeLocationPath() throws SAXPathExceptionReceive notification of the start of a relative location path expression.- Throws:
SAXPathException
-
endRelativeLocationPath
void endRelativeLocationPath() throws SAXPathExceptionReceive notification of the end of a relative location path expression.- Throws:
SAXPathException
-
startNameStep
void startNameStep(int axis, java.lang.String prefix, java.lang.String localName) throws SAXPathExceptionReceive notification of the start of a name step.- Parameters:
axis- the axis of this stepprefix- the namespace prefix for the name to test, or the empty string if no prefix is specifiedlocalName- the local part of the name to test- Throws:
SAXPathException
-
endNameStep
void endNameStep() throws SAXPathExceptionReceive notification of the end of a NameStep- Throws:
SAXPathException
-
startTextNodeStep
void startTextNodeStep(int axis) throws SAXPathExceptionReceive notification of the start of a text() step.- Parameters:
axis- the axis of this step- Throws:
SAXPathException
-
endTextNodeStep
void endTextNodeStep() throws SAXPathExceptionReceive notification of the end of a text() step.- Throws:
SAXPathException
-
startCommentNodeStep
void startCommentNodeStep(int axis) throws SAXPathExceptionReceive notification of the start of a comment() step.- Parameters:
axis- the axis of this step- Throws:
SAXPathException
-
endCommentNodeStep
void endCommentNodeStep() throws SAXPathExceptionReceive notification of the end of a comment() step.- Throws:
SAXPathException
-
startAllNodeStep
void startAllNodeStep(int axis) throws SAXPathExceptionReceive notification of the start of a node() step.- Parameters:
axis- the axis of this step- Throws:
SAXPathException
-
endAllNodeStep
void endAllNodeStep() throws SAXPathExceptionReceive notification of the end of a node() step.- Throws:
SAXPathException
-
startProcessingInstructionNodeStep
void startProcessingInstructionNodeStep(int axis, java.lang.String name) throws SAXPathExceptionReceive notification of the start of a processing-instruction(...) step.- Parameters:
axis- the axis of this stepname- the name of the processing-instruction, or the empty string if none is specified- Throws:
SAXPathException
-
endProcessingInstructionNodeStep
void endProcessingInstructionNodeStep() throws SAXPathExceptionReceive notification of the end of a processing-instruction(...) step.- Throws:
SAXPathException
-
startPredicate
void startPredicate() throws SAXPathExceptionReceive notification of the start of a predicate.- Throws:
SAXPathException
-
endPredicate
void endPredicate() throws SAXPathExceptionReceive notification of the end of a predicate.- Throws:
SAXPathException
-
startFilterExpr
void startFilterExpr() throws SAXPathExceptionReceive notification of the start of a filter expression.- Throws:
SAXPathException
-
endFilterExpr
void endFilterExpr() throws SAXPathExceptionReceive notification of the end of a filter expression.- Throws:
SAXPathException
-
startOrExpr
void startOrExpr() throws SAXPathExceptionReceive notification of the start of an 'or' expression.- Throws:
SAXPathException
-
endOrExpr
void endOrExpr(boolean create) throws SAXPathExceptionReceive 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
void startAndExpr() throws SAXPathExceptionReceive notification of the start of an 'and' expression.- Throws:
SAXPathException
-
endAndExpr
void endAndExpr(boolean create) throws SAXPathExceptionReceive 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
void startEqualityExpr() throws SAXPathExceptionReceive notification of the start of an equality ('=' or '!=') expression.- Throws:
SAXPathException
-
endEqualityExpr
void endEqualityExpr(int equalityOperator) throws SAXPathExceptionReceive notification of the end of an equality ('=' or '!=') expression.- Parameters:
equalityOperator- 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
void startRelationalExpr() throws SAXPathExceptionReceive notification of the start of a relational ('<', '>', '<=', or '>=') expression.- Throws:
SAXPathException
-
endRelationalExpr
void endRelationalExpr(int relationalOperator) throws SAXPathExceptionReceive notification of the start of a relational ('<', '>', '<=', or '>=') expression.- Parameters:
relationalOperator- the operator specific to this particular relational expression. If NO_OP, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startAdditiveExpr
void startAdditiveExpr() throws SAXPathExceptionReceive notification of the start of an additive ('+' or '-') expression.- Throws:
SAXPathException
-
endAdditiveExpr
void endAdditiveExpr(int additiveOperator) throws SAXPathExceptionReceive notification of the end of an additive ('+' or '-') expression.- Parameters:
additiveOperator- the operator specific to this particular additive expression. If NO_OP, this expression is only a pass-through, and should not actually be instantiated.- Throws:
SAXPathException
-
startMultiplicativeExpr
void startMultiplicativeExpr() throws SAXPathExceptionReceive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.- Throws:
SAXPathException
-
endMultiplicativeExpr
void endMultiplicativeExpr(int multiplicativeOperator) throws SAXPathExceptionReceive notification of the start of a multiplicative ('*', 'div' or 'mod') expression.- Parameters:
multiplicativeOperator- 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
void startUnaryExpr() throws SAXPathExceptionReceive notification of the start of a unary ('+' or '-') expression.- Throws:
SAXPathException
-
endUnaryExpr
void endUnaryExpr(int unaryOperator) throws SAXPathExceptionReceive notification of the end of a unary ('+' or '-') expression.- Parameters:
unaryOperator- the operator specific to this particular unary expression. If NO_OP, this expression is only a pass-through, and should not actually be instantiated. If notOperator.NO_OP, it will always beOperator.NEGATIVE.- Throws:
SAXPathException
-
startUnionExpr
void startUnionExpr() throws SAXPathExceptionReceive notification of the start of a union ('|') expression.- Throws:
SAXPathException
-
endUnionExpr
void endUnionExpr(boolean create) throws SAXPathExceptionReceive 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
void number(int number) throws SAXPathExceptionReceive notification of a number expression.- Parameters:
number- the number value- Throws:
SAXPathException
-
number
void number(double number) throws SAXPathExceptionReceive notification of a number expression.- Parameters:
number- the number value- Throws:
SAXPathException
-
literal
void literal(java.lang.String literal) throws SAXPathExceptionReceive notification of a literal expression.- Parameters:
literal- the string literal value- Throws:
SAXPathException
-
variableReference
void variableReference(java.lang.String prefix, java.lang.String variableName) throws SAXPathExceptionReceive notification of a variable-reference expression.- Parameters:
prefix- the namespace prefix of the variablevariableName- the local name of the variable- Throws:
SAXPathException
-
startFunction
void startFunction(java.lang.String prefix, java.lang.String functionName) throws SAXPathExceptionReceive notification of a function call.- Parameters:
prefix- the namespace prefix of the functionfunctionName- the local name of the function- Throws:
SAXPathException
-
endFunction
void endFunction() throws SAXPathExceptionReceive notification of the end of a function call- Throws:
SAXPathException
-
-