APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler

public final Class Template

extends TopLevelElement
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.ConstantPoolGen, .INVOKEVIRTUAL, .InstructionHandle, .InstructionList, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator, .ErrorMsg, .MethodGenerator, .NamedMethodGenerator, .Type, .TypeCheckError, .Util, com.sun.org.apache.xml.internal.utils.XML11Char, java.util.ArrayList, .List

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen, Erwin Bolwidt

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private boolean
private QName
private QName
private List<Param>
private Pattern
private int
private double
private boolean
private Stylesheet
Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement:
_dependencies

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public int
compareTo(Object template)

Compare this template to another.

public void
public boolean
public void
display(int indent)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.display.

Displays the contents of this syntax tree node (to stdout).

public QName
public QName
public List<Param>
public Pattern
public int
public double
public Stylesheet
getStylesheet()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.getStylesheet.

Get the Stylesheet node that represents the <xsl:stylesheet/> element that this node occured under.

public boolean
public boolean
public boolean
public boolean
public void
parseContents(Parser parser)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions).

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.

private boolean
public void
setName(QName qname)

public void
public void
translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.translate.

Translate this node into JVM bytecodes.

public Type
typeCheck(SymbolTable stable)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.typeCheck.

Type check all the children of this node.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement:
addDependencycompilegetDependencies

Field Detail

_compiledback to summary
private boolean _compiled
_disabledback to summary
private boolean _disabled
_isSimpleNamedTemplateback to summary
private boolean _isSimpleNamedTemplate
_modeback to summary
private QName _mode
_nameback to summary
private QName _name
_parametersback to summary
private List<Param> _parameters
_patternback to summary
private Pattern _pattern
_positionback to summary
private int _position
_priorityback to summary
private double _priority
_simplifiedback to summary
private boolean _simplified
_stylesheetback to summary
private Stylesheet _stylesheet

Hides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode._stylesheet.

Constructor Detail

Templateback to summary
public Template()

Method Detail

addParameterback to summary
public void addParameter(Param param)
compareToback to summary
public int compareTo(Object template)

Compare this template to another. First checks priority, then position.

disableback to summary
public void disable()
disabledback to summary
public boolean disabled()
displayback to summary
public void display(int indent)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.display.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.display.

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.

getModeNameback to summary
public QName getModeName()
getNameback to summary
public QName getName()
getParametersback to summary
public List<Param> getParameters()
getPatternback to summary
public Pattern getPattern()
getPositionback to summary
public int getPosition()
getPriorityback to summary
public double getPriority()
getStylesheetback to summary
public Stylesheet getStylesheet()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.getStylesheet.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.getStylesheet.

Get the Stylesheet node that represents the <xsl:stylesheet/> element that this node occured under.

hasParamsback to summary
public boolean hasParams()
isNamedback to summary
public boolean isNamed()
isSimpleNamedTemplateback to summary
public boolean isSimpleNamedTemplate()
isSimplifiedback to summary
public boolean isSimplified()
parseContentsback to summary
public void parseContents(Parser parser)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

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.

parseSimplifiedback to summary
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

resolveNamedTemplatesback to summary
private boolean resolveNamedTemplates(Template other, Parser parser)
setNameback to summary
public void setName(QName qname)
setSimplifiedback to summary
public void setSimplified()
translateback to summary
public void translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.translate.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.translate.

Translate this node into JVM bytecodes.

typeCheckback to summary
public Type typeCheck(SymbolTable stable) throws TypeCheckError

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.typeCheck.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.TopLevelElement.typeCheck.

Type check all the children of this node.