org.apache.xalan.templates
Class XSLTVisitor

java.lang.Object
  extended byorg.apache.xpath.XPathVisitor
      extended byorg.apache.xalan.templates.XSLTVisitor
Direct Known Subclasses:
RedundentExprEliminator

public class XSLTVisitor
extends XPathVisitor

A derivation from this class can be passed to a class that implements the XSLTVisitable interface, to have the appropriate method called for each component of an XSLT stylesheet. Aside from possible other uses, the main intention is to provide a reasonable means to perform expression rewriting.


Constructor Summary
XSLTVisitor()
           
 
Method Summary
(package private)  boolean visitAVT(AVT elem)
          Visit an Attribute Value Template (at the top level).
(package private)  boolean visitExtensionElement(ElemExtensionCall elem)
          Visit an extension element.
(package private)  boolean visitInstruction(ElemTemplateElement elem)
          Visit an XSLT instruction.
(package private)  boolean visitLiteralResultElement(ElemLiteralResult elem)
          Visit a LiteralResultElement.
(package private)  boolean visitStylesheet(ElemTemplateElement elem)
          Visit an XSLT stylesheet instruction.
(package private)  boolean visitTopLevelInstruction(ElemTemplateElement elem)
          Visit an XSLT top-level instruction.
(package private)  boolean visitTopLevelVariableOrParamDecl(ElemTemplateElement elem)
          Visit an XSLT top-level instruction.
(package private)  boolean visitVariableOrParamDecl(ElemVariable elem)
          Visit an XSLT variable or parameter declaration.
 
Methods inherited from class org.apache.xpath.XPathVisitor
visitBinaryOperation, visitFunction, 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
 

Constructor Detail

XSLTVisitor

public XSLTVisitor()
Method Detail

visitInstruction

boolean visitInstruction(ElemTemplateElement elem)
Visit an XSLT instruction. Any element that isn't called by one of the other visit methods, will be called by this method.

Parameters:
elem - The xsl instruction element object.
Returns:
true if the sub expressions should be traversed.

visitStylesheet

boolean visitStylesheet(ElemTemplateElement elem)
Visit an XSLT stylesheet instruction.

Parameters:
elem - The xsl instruction element object.
Returns:
true if the sub expressions should be traversed.

visitTopLevelInstruction

boolean visitTopLevelInstruction(ElemTemplateElement elem)
Visit an XSLT top-level instruction.

Parameters:
elem - The xsl instruction element object.
Returns:
true if the sub expressions should be traversed.

visitTopLevelVariableOrParamDecl

boolean visitTopLevelVariableOrParamDecl(ElemTemplateElement elem)
Visit an XSLT top-level instruction.

Parameters:
elem - The xsl instruction element object.
Returns:
true if the sub expressions should be traversed.

visitVariableOrParamDecl

boolean visitVariableOrParamDecl(ElemVariable elem)
Visit an XSLT variable or parameter declaration.

Parameters:
elem - The xsl instruction element object.
Returns:
true if the sub expressions should be traversed.

visitLiteralResultElement

boolean visitLiteralResultElement(ElemLiteralResult elem)
Visit a LiteralResultElement.

Parameters:
elem - The literal result object.
Returns:
true if the sub expressions should be traversed.

visitAVT

boolean visitAVT(AVT elem)
Visit an Attribute Value Template (at the top level).

Parameters:
elem - The attribute value template object.
Returns:
true if the sub expressions should be traversed.

visitExtensionElement

boolean visitExtensionElement(ElemExtensionCall elem)
Visit an extension element.

Parameters:
elem - The extension object.
Returns:
true if the sub expressions should be traversed.