Class SyntaxTreeNode

java.lang.Object
org.apache.xalan.xsltc.compiler.SyntaxTreeNode
All Implemented Interfaces:
org.apache.bcel.generic.InstructionConstants, Constants
Direct Known Subclasses:
Pattern, Stylesheet, Template

public abstract class SyntaxTreeNode extends Object implements Constants
Author:
Jacek Ambroziak, Santiago Pericas-Geertsen, G. Todd Miller, Morten Jorensen, Erwin Bolwidt invalid input: '<'ejb@klomp.org>, John Howard invalid input: '<'JohnH@schemasoft.com>
  • Field Details

    • UNKNOWN_STYLESHEET_NODE_ID

      public static final int UNKNOWN_STYLESHEET_NODE_ID
      See Also:
  • Constructor Details

    • SyntaxTreeNode

      public SyntaxTreeNode()
      Creates a new SyntaxTreeNode with a 'null' QName and no source file line number reference.
    • SyntaxTreeNode

      public SyntaxTreeNode(int line)
      Creates a new SyntaxTreeNode with a 'null' QName.
      Parameters:
      line - Source file line number reference
    • SyntaxTreeNode

      public SyntaxTreeNode(String uri, String prefix, String local)
      Creates a new SyntaxTreeNode with no source file line number reference.
      Parameters:
      uri - The element's namespace URI
      prefix - The element's namespace prefix
      local - The element's local name
  • Method Details

    • getLineNumber

      public final int getLineNumber()
      Get the source file line number for this element. If unavailable, lookup in ancestors.
      Returns:
      The source file line number.
    • getParser

      public final Parser getParser()
      Returns this node's XSLT parser.
      Returns:
      The XSLT parser.
    • getStylesheet

      public Stylesheet getStylesheet()
      Get the Stylesheet node that represents the invalid input: '<'xsl:stylesheet/> element that this node occured under.
      Returns:
      The Stylesheet ancestor node of this node.
    • parseContents

      public void parseContents(Parser parser)
      Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions). The default behaviour is to parser the syntax tree node's children (since there are no common expressions, patterns, etc. that can be handled in this base class.
      Parameters:
      parser - reference to the XSLT parser
    • typeCheck

      public abstract Type typeCheck(org.apache.xalan.xsltc.compiler.SymbolTable stable) throws TypeCheckError
      Type check the children of this node. The type check phase may add coercions (CastExpr) to the AST.
      Parameters:
      stable - The compiler/parser's symbol table
      Throws:
      TypeCheckError
    • translate

      public abstract void translate(ClassGenerator classGen, MethodGenerator methodGen)
      Translate this abstract syntax tree node into JVM bytecodes.
      Parameters:
      classGen - BCEL Java class generator
      methodGen - BCEL Java method generator
    • display

      public void display(int indent)
      Displays the contents of this syntax tree node (to stdout). This method is intended for debugging _only_, and should be overridden by all syntax tree node implementations.
      Parameters:
      indent - Indentation level for syntax tree levels.