Package org.apache.xalan.extensions
Class ExpressionVisitor
java.lang.Object
org.apache.xpath.XPathVisitor
org.apache.xalan.extensions.ExpressionVisitor
When
StylesheetHandler
creates
an XPath
, the ExpressionVisitor
visits the XPath expression. For any extension functions it
encounters, it instructs StylesheetRoot to register the
extension namespace.
This mechanism is required to locate extension functions
that may be embedded within an expression.-
Constructor Summary
ConstructorsConstructorDescriptionExpressionVisitor
(StylesheetRoot sroot) The constructor sets the StylesheetRoot variable which is used to register extension namespaces. -
Method Summary
Modifier and TypeMethodDescriptionboolean
visitFunction
(ExpressionOwner owner, Function func) If the function is an extension function, register the namespace.Methods inherited from class org.apache.xpath.XPathVisitor
visitBinaryOperation, visitLocationPath, visitMatchPattern, visitNumberLiteral, visitPredicate, visitStep, visitStringLiteral, visitUnaryOperation, visitUnionPath, visitUnionPattern, visitVariableRef
-
Constructor Details
-
ExpressionVisitor
The constructor sets the StylesheetRoot variable which is used to register extension namespaces.- Parameters:
sroot
- the StylesheetRoot that is being constructed.
-
-
Method Details
-
visitFunction
If the function is an extension function, register the namespace.- Overrides:
visitFunction
in classXPathVisitor
- Parameters:
owner
- The current XPath object that owns the expression.func
- The function currently being visited.- Returns:
- true to continue the visit in the subtree, if any.
-