org.apache.xalan.xsltc.compiler
Class Template

java.lang.Object
  |
  +--org.apache.xalan.xsltc.compiler.SyntaxTreeNode
        |
        +--org.apache.xalan.xsltc.compiler.TopLevelElement
              |
              +--org.apache.xalan.xsltc.compiler.Template

public final class Template
extends org.apache.xalan.xsltc.compiler.TopLevelElement


Constructor Summary
Template()
           
 
Method Summary
 int compareTo(java.lang.Object template)
          Compare this template to another.
 void disable()
           
 boolean disabled()
           
 void display(int indent)
           
 org.apache.xalan.xsltc.compiler.QName getModeName()
           
 org.apache.xalan.xsltc.compiler.QName getName()
           
 Pattern getPattern()
           
 int getPosition()
           
 double getPriority()
           
 Stylesheet getStylesheet()
           
 boolean hasParams()
           
 void hasParams(boolean hasParams)
           
 boolean isNamed()
           
 boolean isSimplified()
           
 void parseContents(Parser parser)
           
 void parseSimplified(Stylesheet stylesheet, Parser parser)
          When the parser realises that it is dealign with a simplified stylesheet it will create an empty Stylesheet object with the root element of the stylesheet (a LiteralElement object) as its only child.
 void setName(org.apache.xalan.xsltc.compiler.QName qname)
           
 void setSimplified()
           
 void translate(ClassGenerator classGen, MethodGenerator methodGen)
           
 Type typeCheck(org.apache.xalan.xsltc.compiler.SymbolTable stable)
           
 
Methods inherited from class org.apache.xalan.xsltc.compiler.TopLevelElement
compile
 
Methods inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode
getLineNumber, getParser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Template

public Template()
Method Detail

hasParams

public boolean hasParams()

hasParams

public void hasParams(boolean hasParams)

isSimplified

public boolean isSimplified()

setSimplified

public void setSimplified()

disable

public void disable()

disabled

public boolean disabled()

getPriority

public double getPriority()

getPosition

public int getPosition()

isNamed

public boolean isNamed()

getPattern

public Pattern getPattern()

getName

public org.apache.xalan.xsltc.compiler.QName getName()

setName

public void setName(org.apache.xalan.xsltc.compiler.QName qname)

getModeName

public org.apache.xalan.xsltc.compiler.QName getModeName()

compareTo

public int compareTo(java.lang.Object template)
Compare this template to another. First checks priority, then position.

display

public void display(int indent)
Overrides:
display in class org.apache.xalan.xsltc.compiler.TopLevelElement

getStylesheet

public Stylesheet getStylesheet()
Overrides:
getStylesheet in class SyntaxTreeNode

parseContents

public void parseContents(Parser parser)
Overrides:
parseContents in class SyntaxTreeNode

parseSimplified

public void parseSimplified(Stylesheet stylesheet,
                            Parser parser)
When the parser realises that it is dealign with a simplified stylesheet it will create an empty Stylesheet object with the root element of the stylesheet (a LiteralElement object) as its only child. The Stylesheet object will then create this Template object and invoke this method to force some specific behaviour. What we need to do is: o) create a pattern matching on the root node o) add the LRE root node (the only child of the Stylesheet) as our only child node o) set the empty Stylesheet as our parent o) set this template as the Stylesheet's only child

typeCheck

public Type typeCheck(org.apache.xalan.xsltc.compiler.SymbolTable stable)
               throws TypeCheckError
Overrides:
typeCheck in class org.apache.xalan.xsltc.compiler.TopLevelElement

translate

public void translate(ClassGenerator classGen,
                      MethodGenerator methodGen)
Overrides:
translate in class org.apache.xalan.xsltc.compiler.TopLevelElement


Copyright © 2003 Apache XML Project. All Rights Reserved.