Class FunctionPattern
java.lang.Object
org.htmlunit.xpath.Expression
org.htmlunit.xpath.patterns.NodeTest
org.htmlunit.xpath.patterns.StepPattern
org.htmlunit.xpath.patterns.FunctionPattern
- All Implemented Interfaces:
SourceLocator, SubContextList, ExpressionNode, XPathVisitable
Match pattern step that contains a function.
-
Field Summary
FieldsFields inherited from class StepPattern
m_axis, m_predicates, m_relativePathPattern, m_targetStringFields inherited from class NodeTest
m_name, m_namespace, m_score, m_whatToShow, SCORE_NODETEST, SCORE_NONE, SCORE_NSWILD, SCORE_OTHER, SCORE_QNAME, SHOW_BYFUNCTION, WILD -
Constructor Summary
ConstructorsConstructorDescriptionFunctionPattern(Expression expr, int axis) Construct a FunctionPattern from aexpression. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidStatic calc of match score.protected voidcallSubtreeVisitors(XPathVisitor visitor) Call the visitors on the subtree.execute(XPathContext xctxt) Execute an expression in the XPath runtime context, and return the result of the expression.execute(XPathContext xctxt, int context) Execute an expression in the XPath runtime context, and return the result of the expression.execute(XPathContext xctxt, int context, DTM dtm, int expType) Execute an expression in the XPath runtime context, and return the result of the expression.Methods inherited from class StepPattern
calcTargetString, callVisitors, canTraverseOutsideSubtree, deepEquals, executePredicates, executeRelativePathPattern, getAxis, getLastPos, getPredicate, getPredicateCount, getPredicates, getProximityPosition, getRelativePathPattern, setAxis, setPredicates, setRelativePathPattern, toStringMethods inherited from class NodeTest
getLocalName, getNamespace, getNodeTypeTest, getStaticScore, getWhatToShow, initNodeTest, initNodeTest, setLocalName, setNamespace, setStaticScore, setWhatToShowMethods inherited from class Expression
asIterator, asNode, assertion, bool, error, execute, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isSameClass, isStableNumber, num
-
Field Details
-
m_functionExpr
Should be aexpression.
-
-
Constructor Details
-
FunctionPattern
Construct a FunctionPattern from aexpression.NEEDSDOC @param expr
-
-
Method Details
-
calcScore
-
execute
Execute an expression in the XPath runtime context, and return the result of the expression.- Overrides:
executein classStepPattern- Parameters:
xctxt- The XPath runtime context.context- The currentNode.- Returns:
- The result of the expression in the form of a
XObject. - Throws:
TransformerException- if a runtime exception occurs.
-
execute
public XObject execute(XPathContext xctxt, int context, DTM dtm, int expType) throws TransformerException Execute an expression in the XPath runtime context, and return the result of the expression.- Overrides:
executein classStepPattern- Parameters:
xctxt- The XPath runtime context.context- The currentNode.dtm- The DTM of the current node.expType- The expanded type ID of the current node.- Returns:
- The result of the expression in the form of a
XObject. - Throws:
TransformerException- if a runtime exception occurs.
-
execute
Execute an expression in the XPath runtime context, and return the result of the expression.- Overrides:
executein classStepPattern- Parameters:
xctxt- The XPath runtime context.- Returns:
- The result of the expression in the form of a
XObject. - Throws:
TransformerException- if a runtime exception occurs.
-
callSubtreeVisitors
Call the visitors on the subtree. Factored out from callVisitors so it may be called by derived classes.- Overrides:
callSubtreeVisitorsin classStepPattern
-