org.apache.xalan.xsltc.compiler

Class Template

public final class Template extends TopLevelElement

Author: Jacek Ambroziak Santiago Pericas-Geertsen Morten Jorgensen Erwin Bolwidt

Method Summary
voidaddParameter(Param param)
intcompareTo(Object template)
Compare this template to another.
voiddisable()
booleandisabled()
voiddisplay(int indent)
QNamegetModeName()
QNamegetName()
VectorgetParameters()
PatterngetPattern()
intgetPosition()
doublegetPriority()
StylesheetgetStylesheet()
booleanhasParams()
booleanisNamed()
booleanisSimpleNamedTemplate()
booleanisSimplified()
voidparseContents(Parser parser)
voidparseSimplified(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.
voidsetName(QName qname)
voidsetSimplified()
voidtranslate(ClassGenerator classGen, MethodGenerator methodGen)
TypetypeCheck(SymbolTable stable)

Method Detail

addParameter

public void addParameter(Param param)

compareTo

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

disable

public void disable()

disabled

public boolean disabled()

display

public void display(int indent)

getModeName

public QName getModeName()

getName

public QName getName()

getParameters

public Vector getParameters()

getPattern

public Pattern getPattern()

getPosition

public int getPosition()

getPriority

public double getPriority()

getStylesheet

public Stylesheet getStylesheet()

hasParams

public boolean hasParams()

isNamed

public boolean isNamed()

isSimpleNamedTemplate

public boolean isSimpleNamedTemplate()

isSimplified

public boolean isSimplified()

parseContents

public void parseContents(Parser parser)

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

setName

public void setName(QName qname)

setSimplified

public void setSimplified()

translate

public void translate(ClassGenerator classGen, MethodGenerator methodGen)

typeCheck

public Type typeCheck(SymbolTable stable)
Copyright B) 2006 Apache XML Project. All Rights Reserved.