org.apache.xalan.extensions
Class ExpressionVisitor

java.lang.Object
  extended byorg.apache.xpath.XPathVisitor
      extended byorg.apache.xalan.extensions.ExpressionVisitor

public class ExpressionVisitor
extends XPathVisitor

When org.apache.xalan.templates.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.


Field Summary
private  StylesheetRoot m_sroot
           
 
Constructor Summary
ExpressionVisitor(StylesheetRoot sroot)
          The constructor sets the StylesheetRoot variable which is used to register extension namespaces.
 
Method Summary
 boolean 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_sroot

private StylesheetRoot m_sroot
Constructor Detail

ExpressionVisitor

public ExpressionVisitor(StylesheetRoot sroot)
The constructor sets the StylesheetRoot variable which is used to register extension namespaces.

Parameters:
sroot - the StylesheetRoot that is being constructed.
Method Detail

visitFunction

public boolean visitFunction(ExpressionOwner owner,
                             Function func)
If the function is an extension function, register the namespace.

Overrides:
visitFunction in class XPathVisitor
Parameters:
owner - The current XPath object that owns the expression.
func - The function reference object.
Returns:
true to continue the visit in the subtree, if any.