| Modifier and Type | Field and Description |
|---|---|
| private List | _allValidTemplates
Used to cache result of |
| private boolean | _callsNodeset
Flag indicating if nodset() is called. |
| private String | _className
The name of the class being generated. |
| private Mode | _defaultMode
A reference to the default Mode object. |
| private final Map | _extensions
Mapping between extension URIs and their prefixes. |
| private List | _globals
Contains global variables and parameters defined in the stylesheet. |
| private boolean | _hasIdCall
Flag indicating if id() is called. |
| private Boolean | _hasLocalParams
Used to cache the result returned by |
| public Stylesheet | _importedFrom
Reference to the stylesheet from which this stylesheet was imported (if any). |
| private int | _importPrecedence
Import precendence for this stylesheet. |
| public Stylesheet | _includedFrom
Reference to the stylesheet from which this stylesheet was included (if any). |
| private List | _includedStylesheets
Array of all the stylesheets imported or included from this one. |
| private Map | _keys
Mapping between key names and Key objects (needed by Key/IdPattern). |
| private Output | _lastOutputElement
A reference to the last xsl:output object found in the styleshet. |
| private SourceLoader | _loader
A reference to the SourceLoader set by the user (a URIResolver if the JAXP API is being used). |
| private int | _minimumDescendantPrecedence
Minimum precendence of any descendant stylesheet by inclusion or importation. |
| private final Map | _modes
Mapping between mode names and Mode instances. |
| private boolean | _multiDocument
Flag indicating if multi-document support is needed. |
| private QName | _name
Internal name of this stylesheet used as a key into the symbol table. |
| private int | _nextModeSerial
Counter to generate unique mode suffixes. |
| private boolean | _numberFormattingUsed
Flag indicating if format-number() is called. |
| private int | _outputMethod
Output method for this stylesheet (must be set to one of the constants defined below). |
| private Properties | _outputProperties
Output properties for this stylesheet. |
| private Stylesheet | _parentStylesheet
A reference to the parent stylesheet or null if topmost. |
| private boolean | _simplified
Flag indicating if this is a simplified stylesheets. |
| private String | _systemId
A URI that represents the system ID for this stylesheet. |
| private boolean | _templateInlining
Set to true to enable template inlining optimization. |
| private final List | _templates
Contains all templates defined in this stylesheet |
| private String | _version
XSLT version defined in the stylesheet. |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | |
| public int | |
| protected void | addPrefixMapping(String
Namespace prefix. prefix, String Namespace URI. uri)Overrides com. Adds a single prefix mapping to this syntax tree node. |
| private void | |
| protected void | |
| public int | |
| public boolean | |
| public boolean | |
| private void | |
| private String | |
| private void | |
| private void | |
| private void | compileStaticInitializer(ClassGenerator classGen)
Compile the namesArray, urisArray and typesArray into the static initializer. |
| private String | |
| private void | |
| public void | |
| public void | display(int indent)
Overrides com. Displays the contents of this syntax tree node (to stdout). |
| private void | |
| public List | |
| public String | |
| public int | getImportPrecedence()
Overrides com. Get the import precedence of this element. |
| public Output | |
| public int | getMinimumDescendantPrecedence()
Get the minimum of the precedence of this stylesheet, any stylesheet imported by this stylesheet and any include/import descendant of this stylesheet. |
| public Mode | |
| public String | |
| public int | |
| public Properties | |
| public Stylesheet | |
| public SourceLoader | |
| public String | |
| public boolean | |
| public List | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| private QName | |
| public void | |
| public void | parseContents(Parser parser)
Overrides com. Parse the version and uri fields of the stylesheet and add an entry to the symbol table mapping the name __stylesheet_ to an instance of this class. |
| public final void | |
| private void | peepHoleOptimization(MethodGenerator methodGen)
Peephole optimization: Remove sequences of [ALOAD, POP]. |
| public void | |
| private List | resolveDependencies(List<SyntaxTreeNode> input)
This method returns a vector with variables/params and keys in the order in which they are to be compiled for initialization. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setParser(Parser parser)
Overrides com. Set this node's parser. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | translate(ClassGenerator classGen, MethodGenerator methodGen)
Implements abstract com. Translate the stylesheet into JVM bytecodes. |
| public void | |
| public Type | typeCheck(SymbolTable stable)
Implements abstract com. Type check all the children of this node. |
| _allValidTemplates | back to summary |
|---|---|
| private List<Template> _allValidTemplates Used to cache result of | |
| _callsNodeset | back to summary |
|---|---|
| private boolean _callsNodeset Flag indicating if nodset() is called. | |
| _className | back to summary |
|---|---|
| private String _className The name of the class being generated. | |
| _defaultMode | back to summary |
|---|---|
| private Mode _defaultMode A reference to the default Mode object. | |
| _extensions | back to summary |
|---|---|
| private final Map<String, String> _extensions Mapping between extension URIs and their prefixes. | |
| _globals | back to summary |
|---|---|
| private List<VariableBase> _globals Contains global variables and parameters defined in the stylesheet. | |
| _hasIdCall | back to summary |
|---|---|
| private boolean _hasIdCall Flag indicating if id() is called. | |
| _hasLocalParams | back to summary |
|---|---|
| private Boolean _hasLocalParams Used to cache the result returned by | |
| _importedFrom | back to summary |
|---|---|
| public Stylesheet _importedFrom Reference to the stylesheet from which this stylesheet was imported (if any). | |
| _importPrecedence | back to summary |
|---|---|
| private int _importPrecedence Import precendence for this stylesheet. | |
| _includedFrom | back to summary |
|---|---|
| public Stylesheet _includedFrom Reference to the stylesheet from which this stylesheet was included (if any). | |
| _includedStylesheets | back to summary |
|---|---|
| private List<Stylesheet> _includedStylesheets Array of all the stylesheets imported or included from this one. | |
| _keys | back to summary |
|---|---|
| private Map<String, Key> _keys Mapping between key names and Key objects (needed by Key/IdPattern). | |
| _lastOutputElement | back to summary |
|---|---|
| private Output _lastOutputElement A reference to the last xsl:output object found in the styleshet. | |
| _loader | back to summary |
|---|---|
| private SourceLoader _loader A reference to the SourceLoader set by the user (a URIResolver if the JAXP API is being used). | |
| _minimumDescendantPrecedence | back to summary |
|---|---|
| private int _minimumDescendantPrecedence Minimum precendence of any descendant stylesheet by inclusion or importation. | |
| _modes | back to summary |
|---|---|
| private final Map<String, Mode> _modes Mapping between mode names and Mode instances. | |
| _multiDocument | back to summary |
|---|---|
| private boolean _multiDocument Flag indicating if multi-document support is needed. | |
| _name | back to summary |
|---|---|
| private QName _name Internal name of this stylesheet used as a key into the symbol table. | |
| _nextModeSerial | back to summary |
|---|---|
| private int _nextModeSerial Counter to generate unique mode suffixes. | |
| _numberFormattingUsed | back to summary |
|---|---|
| private boolean _numberFormattingUsed Flag indicating if format-number() is called. | |
| _outputMethod | back to summary |
|---|---|
| private int _outputMethod Output method for this stylesheet (must be set to one of the constants defined below). | |
| _outputProperties | back to summary |
|---|---|
| private Properties _outputProperties Output properties for this stylesheet. | |
| _parentStylesheet | back to summary |
|---|---|
| private Stylesheet _parentStylesheet A reference to the parent stylesheet or null if topmost. | |
| _simplified | back to summary |
|---|---|
| private boolean _simplified Flag indicating if this is a simplified stylesheets. A template matching on "/" must be added in this case. | |
| _systemId | back to summary |
|---|---|
| private String _systemId A URI that represents the system ID for this stylesheet. | |
| _templateInlining | back to summary |
|---|---|
| private boolean _templateInlining Set to true to enable template inlining optimization.
| |
| _templates | back to summary |
|---|---|
| private final List<Template> _templates Contains all templates defined in this stylesheet | |
| _version | back to summary |
|---|---|
| private String _version XSLT version defined in the stylesheet. | |
| HTML_OUTPUT | back to summary |
|---|---|
| public static final int HTML_OUTPUT | |
| TEXT_OUTPUT | back to summary |
|---|---|
| public static final int TEXT_OUTPUT | |
| UNKNOWN_OUTPUT | back to summary |
|---|---|
| public static final int UNKNOWN_OUTPUT | |
| XML_OUTPUT | back to summary |
|---|---|
| public static final int XML_OUTPUT | |
| Stylesheet | back to summary |
|---|---|
| public Stylesheet() | |
| addDOMField | back to summary |
|---|---|
| private void addDOMField(ClassGenerator classGen) | |
| addIncludedStylesheet | back to summary |
|---|---|
| public void addIncludedStylesheet(Stylesheet child) | |
| addParam | back to summary |
|---|---|
| public int addParam(Param param) | |
| addPrefixMapping | back to summary |
|---|---|
| protected void addPrefixMapping(String prefix, String uri) Overrides com. Adds a single prefix mapping to this syntax tree node. | |
| addStaticField | back to summary |
|---|---|
| private void addStaticField(ClassGenerator classGen, String type, String name) Add a static field | |
| addTemplate | back to summary |
|---|---|
| protected void addTemplate(Template template) | |
| addVariable | back to summary |
|---|---|
| public int addVariable(Variable global) | |
| callsNodeset | back to summary |
|---|---|
| public boolean callsNodeset() | |
| checkForLoop | back to summary |
|---|---|
| public boolean checkForLoop(String systemId) | |
| checkOutputMethod | back to summary |
|---|---|
| private void checkOutputMethod() Check and set the output method | |
| compileBuildKeys | back to summary |
|---|---|
| private String compileBuildKeys(ClassGenerator classGen) Compile a buildKeys() method into the output class. Note that keys for the input document are created in topLevel(), not in this method. However, we still need this method to create keys for documents loaded via the XPath document() function. | |
| compileConstructor | back to summary |
|---|---|
| private void compileConstructor(ClassGenerator classGen, Output output) Compile the translet's constructor | |
| compileModes | back to summary |
|---|---|
| private void compileModes(ClassGenerator classGen) | |
| compileStaticInitializer | back to summary |
|---|---|
| private void compileStaticInitializer(ClassGenerator classGen) Compile the namesArray, urisArray and typesArray into the static initializer. They are read-only from the translet. All translet instances can share a single copy of this informtion. | |
| compileTopLevel | back to summary |
|---|---|
| private String compileTopLevel(ClassGenerator classGen) Compile a topLevel() method into the output class. This method is called from transform() to handle all non-template top-level elements. Returns the signature of the topLevel() method. Global variables/params and keys are first sorted to resolve dependencies between them. The XSLT 1.0 spec does not allow a key to depend on a variable. However, for compatibility with Xalan interpretive, that type of dependency is allowed. Note also that the buildKeys() method is still generated as it is used by the LoadDocument class, but it no longer called from transform(). | |
| compileTransform | back to summary |
|---|---|
| private void compileTransform(ClassGenerator classGen) Compile transform() into the output class. This method is used to initialize global variables and global parameters. The current node is set to be the document's root node. | |
| declareExtensionPrefixes | back to summary |
|---|---|
| public void declareExtensionPrefixes(Parser parser) | |
| display | back to summary |
|---|---|
| public void display(int indent) Overrides com. Doc from com. 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. | |
| extensionURI | back to summary |
|---|---|
| private void extensionURI(String prefixes, SymbolTable stable) Store extension URIs | |
| getAllValidTemplates | back to summary |
|---|---|
| public List | |
| getClassName | back to summary |
|---|---|
| public String getClassName() | |
| getImportPrecedence | back to summary |
|---|---|
| public int getImportPrecedence() Overrides com. Doc from com. Get the import precedence of this element. The import precedence equals the import precedence of the stylesheet in which this element occured. | |
| getLastOutputElement | back to summary |
|---|---|
| public Output getLastOutputElement() | |
| getMinimumDescendantPrecedence | back to summary |
|---|---|
| public int getMinimumDescendantPrecedence() Get the minimum of the precedence of this stylesheet, any stylesheet imported by this stylesheet and any include/import descendant of this stylesheet. | |
| getMode | back to summary |
|---|---|
| public Mode getMode(QName modeName) | |
| getNamespace | back to summary |
|---|---|
| public String getNamespace(String prefix) | |
| getOutputMethod | back to summary |
|---|---|
| public int getOutputMethod() Return the output method | |
| getOutputProperties | back to summary |
|---|---|
| public Properties getOutputProperties() | |
| getParentStylesheet | back to summary |
|---|---|
| public Stylesheet getParentStylesheet() | |
| getSourceLoader | back to summary |
|---|---|
| public SourceLoader getSourceLoader() | |
| getSystemId | back to summary |
|---|---|
| public String getSystemId() | |
| getTemplateInlining | back to summary |
|---|---|
| public boolean getTemplateInlining() | |
| getTemplates | back to summary |
|---|---|
| public List | |
| hasGlobals | back to summary |
|---|---|
| public boolean hasGlobals() Returns true if this stylesheet has global vars or params. | |
| hasLocalParams | back to summary |
|---|---|
| public boolean hasLocalParams() Returns true if at least one template in the stylesheet has params
defined. Uses the variable | |
| isExtension | back to summary |
|---|---|
| public boolean isExtension(String uri) | |
| isMultiDocument | back to summary |
|---|---|
| public boolean isMultiDocument() | |
| isSimplified | back to summary |
|---|---|
| public boolean isSimplified() | |
| makeStylesheetName | back to summary |
|---|---|
| private QName makeStylesheetName(String prefix) | |
| numberFormattingUsed | back to summary |
|---|---|
| public void numberFormattingUsed() | |
| parseContents | back to summary |
|---|---|
| public void parseContents(Parser parser) Overrides com. Parse the version and uri fields of the stylesheet and add an entry to the symbol table mapping the name __stylesheet_ to an instance of this class. | |
| parseOwnChildren | back to summary |
|---|---|
| public final void parseOwnChildren(Parser parser) Parse all direct children of the <xsl:stylesheet/> element. | |
| peepHoleOptimization | back to summary |
|---|---|
| private void peepHoleOptimization(MethodGenerator methodGen) Peephole optimization: Remove sequences of [ALOAD, POP]. | |
| processModes | back to summary |
|---|---|
| public void processModes() | |
| resolveDependencies | back to summary |
|---|---|
| private List This method returns a vector with variables/params and keys in the order in which they are to be compiled for initialization. The order is determined by analyzing the dependencies between them. The XSLT 1.0 spec does not allow a key to depend on a variable. However, for compatibility with Xalan interpretive, that type of dependency is allowed and, therefore, consider to determine the partial order. | |
| setCallsNodeset | back to summary |
|---|---|
| public void setCallsNodeset(boolean flag) | |
| setHasIdCall | back to summary |
|---|---|
| public void setHasIdCall(boolean flag) | |
| setImportingStylesheet | back to summary |
|---|---|
| public void setImportingStylesheet(Stylesheet parent) | |
| setImportPrecedence | back to summary |
|---|---|
| public void setImportPrecedence(final int precedence) | |
| setIncludingStylesheet | back to summary |
|---|---|
| public void setIncludingStylesheet(Stylesheet parent) | |
| setMultiDocument | back to summary |
|---|---|
| public void setMultiDocument(boolean flag) | |
| setOutputProperties | back to summary |
|---|---|
| public void setOutputProperties(Properties props) | |
| setOutputProperty | back to summary |
|---|---|
| public void setOutputProperty(String key, String value) | |
| setParentStylesheet | back to summary |
|---|---|
| public void setParentStylesheet(Stylesheet parent) | |
| setParser | back to summary |
|---|---|
| public void setParser(Parser parser) Overrides com. Doc from com. Set this node's parser. The parser (the XSLT parser) gives this syntax tree node access to the symbol table and XPath parser. | |
| setSimplified | back to summary |
|---|---|
| public void setSimplified() | |
| setSourceLoader | back to summary |
|---|---|
| public void setSourceLoader(SourceLoader loader) | |
| setSystemId | back to summary |
|---|---|
| public void setSystemId(String systemId) | |
| setTemplateInlining | back to summary |
|---|---|
| public void setTemplateInlining(boolean flag) | |
| translate | back to summary |
|---|---|
| public void translate(ClassGenerator classGen, MethodGenerator methodGen) Implements abstract com. Translate the stylesheet into JVM bytecodes. | |
| translate | back to summary |
|---|---|
| public void translate() Translate the stylesheet into JVM bytecodes. | |
| typeCheck | back to summary |
|---|---|
| public Type typeCheck(SymbolTable stable) throws TypeCheckError Implements abstract com. Type check all the children of this node. | |