| Modifier and Type | Field and Description |
|---|---|
| protected AttributesImpl | |
| private final List | |
| private int | |
| protected SyntaxTreeNode | |
| private Parser | |
| private Map | |
| protected QName | |
| private static final char[] | |
| private Stylesheet | |
| private Template | |
| protected static final SyntaxTreeNode | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| public | SyntaxTreeNode()
Creates a new SyntaxTreeNode with a 'null' QName and no source file line number reference. |
| public | SyntaxTreeNode(int
Source file line number reference line)Creates a new SyntaxTreeNode with a 'null' QName. |
| public | SyntaxTreeNode(String
The element's namespace URI uri, String The element's namespace prefix prefix, String The element's local name local)Creates a new SyntaxTreeNode with no source file line number reference. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected final void | |
| protected void | addPrefixMapping(String
Namespace prefix. prefix, String Namespace URI. uri)Adds a single prefix mapping to this syntax tree node. |
| protected void | compileResultTree(ClassGenerator
BCEL Java class generator classGen, MethodGenerator BCEL Java method generator methodGen)Utility method used by parameters and variables to store result trees |
| protected boolean | Returns: 'true' if this node depends on the context.Returns true if this expression/instruction depends on the context. |
| protected boolean | Returns: 'true' if the contents of this node is context dependent.Return true if any of the expressions/instructions in the contents of this node is context dependent. |
| public void | display(int
Indentation level for syntax tree levels. indent)Displays the contents of this syntax tree node (to stdout). |
| protected void | displayContents(int
Indentation level for syntax tree levels. indent)Displays the contents of this syntax tree node (to stdout). |
| protected final SyntaxTreeNode | Returns: The child node.The child node's position. pos)Returns a child node at a given position. |
| protected final int | |
| protected final Iterator | Returns: An Iterator of all child nodes of this node.Returns an Iterator of all child nodes of this node. |
| protected String | Returns: The value of the attribute of name 'qname'.The QName of the attribute to return. qname)Returns a value for an attribute from the source element. |
| protected String | |
| protected Attributes | Returns: Attributes for this syntax tree nodeReturns a list of all attributes declared for the element represented by this syntax tree node. |
| protected final List | Returns: A List containing all the child nodes of this node.Returns a List containing all the child nodes of this node. |
| protected int | Returns: The import precedence of this syntax tree node.Get the import precedence of this element. |
| public final int | Returns: The source file line number.Get the source file line number for this element. |
| protected final SyntaxTreeNode | |
| public final Parser | |
| protected Map | Returns: Prefix mappings (for this element only).Returns a Map containing the prefix mappings that were declared for this element. |
| protected QName | |
| public Stylesheet | Returns: The Stylesheet ancestor node of this node.Get the Stylesheet node that represents the <xsl:stylesheet/> element that this node occured under. |
| protected final SymbolTable | |
| protected Template | Returns: The Template ancestor node of this node or 'null'.Get the Template node that represents the <xsl:template/> element that this node occured under. |
| protected final XSLTC | |
| protected boolean | |
| protected final boolean | Returns: 'true' if this node has any children.Tells you if this node has any child nodes. |
| protected final void | indent(int
Indentation level for syntax tree levels. indent)Set the indentation level for debug output. |
| private boolean | Returns: true if the node content can be considered as an adaptive RTF.A node node)Return true if the node represents an adaptive RTF. |
| protected final boolean | Returns: 'true' if this syntax tree node is the Sentinal node.Returns 'true' if this syntax tree node is the Sentinal node. |
| private boolean | Returns: true if the node content can be considered as a simple RTF.A node node)Return true if the node represents a simple RTF. |
| private boolean | Returns: true if the node of Text typeA node node, boolean If this flag is true, <xsl:call-template> and
<xsl:apply-templates> are also considered as Text elements. doExtendedCheck)Return true if the node only produces Text content. |
| protected final SyntaxTreeNode | |
| protected String | Returns: Namespace URI.Namespace prefix. prefix)Returns any namespace URI that is in scope for a given prefix. |
| protected String | Returns: Namespace prefix.Namespace URI. uri)Returns any namespace prefix that is mapped to a prefix in the current scope. |
| public boolean | |
| protected final void | parseChildren(Parser
reference to the XSLT parser parser)Parse all children of this syntax tree node. |
| public void | parseContents(Parser
reference to the XSLT parser parser)Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions). |
| protected final void | removeElement(SyntaxTreeNode
is the child node to remove. element)Removed a child node of this syntax tree node. |
| protected void | reportError(SyntaxTreeNode
The element in which the error occured (normally 'this'
but it could also be an expression/pattern/etc.) element, Parser The XSLT parser to report the error to. parser, String errorCode, String Any additional error message. message)Report an error to the parser. |
| protected void | reportWarning(SyntaxTreeNode
The element in which the error occured (normally 'this'
but it could also be an expression/pattern/etc.) element, Parser The XSLT parser to report the error to. parser, String errorCode, String Any additional error message. message)Report a recoverable error to the parser. |
| protected void | setAttributes(AttributesImpl
Attributes for the element. Must be passed in as an
implementation of org.xml.sax.Attributes. attributes)Set the attributes for this SyntaxTreeNode. |
| protected final void | setFirstElement(SyntaxTreeNode
is the new child node. element)Inserts the first child node of this syntax tree node. |
| protected final void | |
| protected void | |
| protected void | |
| protected void | setPrefixMapping(Map<String, String>
The Map containing the mappings. mapping)Sets the prefix mapping for the namespaces that were declared in this element. |
| protected void | |
| protected void | |
| public abstract void | translate(ClassGenerator
BCEL Java class generator classGen, MethodGenerator BCEL Java method generator methodGen)Translate this abstract syntax tree node into JVM bytecodes. |
| protected void | translateContents(ClassGenerator
BCEL Java class generator classGen, MethodGenerator BCEL Java method generator methodGen)Call translate() on all child syntax tree nodes. |
| public abstract Type | typeCheck(SymbolTable
The compiler/parser's symbol table stable)Type check the children of this node. |
| protected Type | typeCheckContents(SymbolTable
The compiler/parser's symbol table stable)Call typeCheck() on all child syntax tree nodes. |
| protected QName | updateScope(Parser parser, SyntaxTreeNode node)
Add a node to the current scope and return name of a variable or parameter if the node represents a variable or a parameter. |
| _attributes | back to summary |
|---|---|
| protected AttributesImpl _attributes | |
| _contents | back to summary |
|---|---|
| private final List<SyntaxTreeNode> _contents | |
| _line | back to summary |
|---|---|
| private int _line | |
| _parent | back to summary |
|---|---|
| protected SyntaxTreeNode _parent | |
| _parser | back to summary |
|---|---|
| private Parser _parser | |
| _prefixMapping | back to summary |
|---|---|
| private Map<String, String> _prefixMapping | |
| _qname | back to summary |
|---|---|
| protected QName _qname | |
| _spaces | back to summary |
|---|---|
| private static final char[] _spaces | |
| _stylesheet | back to summary |
|---|---|
| private Stylesheet _stylesheet | |
| _template | back to summary |
|---|---|
| private Template _template | |
| Dummy | back to summary |
|---|---|
| protected static final SyntaxTreeNode Dummy | |
| IndentIncrement | back to summary |
|---|---|
| protected static final int IndentIncrement | |
| SyntaxTreeNode | back to summary |
|---|---|
| public SyntaxTreeNode() Creates a new SyntaxTreeNode with a 'null' QName and no source file line number reference. | |
| SyntaxTreeNode | back to summary |
|---|---|
| public SyntaxTreeNode(int line) Creates a new SyntaxTreeNode with a 'null' QName.
| |
| SyntaxTreeNode | back to summary |
|---|---|
| public SyntaxTreeNode(String uri, String prefix, String local) Creates a new SyntaxTreeNode with no source file line number reference. | |
| addAttribute | back to summary |
|---|---|
| protected void addAttribute(String qname, String value) | |
| addElement | back to summary |
|---|---|
| protected final void addElement(SyntaxTreeNode element) Adds a child node to this syntax tree node.
| |
| addPrefixMapping | back to summary |
|---|---|
| protected void addPrefixMapping(String prefix, String uri) Adds a single prefix mapping to this syntax tree node. | |
| compileResultTree | back to summary |
|---|---|
| protected void compileResultTree(ClassGenerator classGen, MethodGenerator methodGen) Utility method used by parameters and variables to store result trees
| |
| contextDependent | back to summary |
|---|---|
| protected boolean contextDependent() Returns true if this expression/instruction depends on the context. By default, every expression/instruction depends on the context unless it overrides this method. Currently used to determine if result trees are compiled using procedures or little DOMs (result tree fragments).
| |
| dependentContents | back to summary |
|---|---|
| protected boolean dependentContents() Return true if any of the expressions/instructions in the contents of this node is context dependent.
| |
| display | back to summary |
|---|---|
| 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.
| |
| displayContents | back to summary |
|---|---|
| protected void displayContents(int indent) Displays the contents of this syntax tree node (to stdout). This method is intended for debugging _only_ !!!
| |
| elementAt | back to summary |
|---|---|
| protected final SyntaxTreeNode elementAt(int pos) Returns a child node at a given position.
| |
| elementCount | back to summary |
|---|---|
| protected final int elementCount() Returns the number of children this node has.
| |
| elements | back to summary |
|---|---|
| protected final Iterator Returns an Iterator of all child nodes of this node.
| |
| getAttribute | back to summary |
|---|---|
| protected String getAttribute(String qname) Returns a value for an attribute from the source element. | |
| getAttribute | back to summary |
|---|---|
| protected String getAttribute(String prefix, String localName) | |
| getAttributes | back to summary |
|---|---|
| protected Attributes getAttributes() Returns a list of all attributes declared for the element represented by this syntax tree node.
| |
| getContents | back to summary |
|---|---|
| protected final List Returns a List containing all the child nodes of this node.
| |
| getImportPrecedence | back to summary |
|---|---|
| protected int getImportPrecedence() Get the import precedence of this element. The import precedence equals the import precedence of the stylesheet in which this element occured.
| |
| getLineNumber | back to summary |
|---|---|
| public final int getLineNumber() Get the source file line number for this element. If unavailable, lookup in ancestors.
| |
| getParent | back to summary |
|---|---|
| protected final SyntaxTreeNode getParent() Returns this syntax tree node's parent node.
| |
| getParser | back to summary |
|---|---|
| public final Parser getParser() Returns this node's XSLT parser.
| |
| getPrefixMapping | back to summary |
|---|---|
| protected Map Returns a Map containing the prefix mappings that were declared for this element. This does not include all prefix mappings in scope, so one may have to check ancestor elements to get all mappings that are in in scope. | |
| getQName | back to summary |
|---|---|
| protected QName getQName() Set the QName for the SyntaxTreeNode | |
| getStylesheet | back to summary |
|---|---|
| public Stylesheet getStylesheet() Get the Stylesheet node that represents the <xsl:stylesheet/> element that this node occured under.
| |
| getSymbolTable | back to summary |
|---|---|
| protected final SymbolTable getSymbolTable() Returns the XSLT parser's symbol table.
| |
| getTemplate | back to summary |
|---|---|
| protected Template getTemplate() Get the Template node that represents the <xsl:template/> element that this node occured under. Note that this method will return 'null' for nodes that represent top-level elements.
| |
| getXSLTC | back to summary |
|---|---|
| protected final XSLTC getXSLTC() Returns a reference to the XSLTC (XSLT compiler) in use.
| |
| hasAttribute | back to summary |
|---|---|
| protected boolean hasAttribute(String qname) | |
| hasContents | back to summary |
|---|---|
| protected final boolean hasContents() Tells you if this node has any child nodes.
| |
| indent | back to summary |
|---|---|
| protected final void indent(int indent) Set the indentation level for debug output.
| |
| isAdaptiveRTF | back to summary |
|---|---|
| private boolean isAdaptiveRTF(SyntaxTreeNode node) Return true if the node represents an adaptive RTF. A node is an adaptive RTF if each children is a Text element or it is <xsl:call-template> or <xsl:apply-templates>.
| |
| isDummy | back to summary |
|---|---|
| protected final boolean isDummy() Returns 'true' if this syntax tree node is the Sentinal node.
| |
| isSimpleRTF | back to summary |
|---|---|
| private boolean isSimpleRTF(SyntaxTreeNode node) Return true if the node represents a simple RTF. A node is a simple RTF if all children only produce Text value.
| |
| isTextElement | back to summary |
|---|---|
| private boolean isTextElement(SyntaxTreeNode node, boolean doExtendedCheck) Return true if the node only produces Text content. A node is a Text element if it is Text, xsl:value-of, xsl:number, or a combination of these nested in a control instruction (xsl:if or xsl:choose). If the doExtendedCheck flag is true, xsl:call-template and xsl:apply-templates are also considered as Text elements.
| |
| lastChild | back to summary |
|---|---|
| protected final SyntaxTreeNode lastChild() Returns this element's last child
| |
| lookupNamespace | back to summary |
|---|---|
| protected String lookupNamespace(String prefix) Returns any namespace URI that is in scope for a given prefix. This method checks namespace mappings for this element, and if necessary for ancestor elements as well (ie. if the prefix maps to an URI in this scope then you'll definately get the URI from this method). | |
| lookupPrefix | back to summary |
|---|---|
| protected String lookupPrefix(String uri) Returns any namespace prefix that is mapped to a prefix in the current scope. This method checks namespace mappings for this element, and if necessary for ancestor elements as well (ie. if the URI is declared within the current scope then you'll definately get the prefix from this method). Note that this is a very slow method and consequentially it should only be used strictly when needed. | |
| notTypeOf | back to summary |
|---|---|
| public boolean notTypeOf(Class<?> type) Checks whether any children of this node is not of the specified type.
| |
| parseChildren | back to summary |
|---|---|
| protected final void parseChildren(Parser parser) Parse all children of this syntax tree node. This method is normally called by the parseContents() method.
| |
| parseContents | back to summary |
|---|---|
| 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.
| |
| removeElement | back to summary |
|---|---|
| protected final void removeElement(SyntaxTreeNode element) Removed a child node of this syntax tree node.
| |
| reportError | back to summary |
|---|---|
| protected void reportError(SyntaxTreeNode element, Parser parser, String errorCode, String message) Report an error to the parser.
| |
| reportWarning | back to summary |
|---|---|
| protected void reportWarning(SyntaxTreeNode element, Parser parser, String errorCode, String message) Report a recoverable error to the parser.
| |
| setAttributes | back to summary |
|---|---|
| protected void setAttributes(AttributesImpl attributes) Set the attributes for this SyntaxTreeNode.
| |
| setFirstElement | back to summary |
|---|---|
| protected final void setFirstElement(SyntaxTreeNode element) Inserts the first child node of this syntax tree node. The existing children are shifted back one position.
| |
| setLineNumber | back to summary |
|---|---|
| protected final void setLineNumber(int line) Set the source file line number for this element
| |
| setParent | back to summary |
|---|---|
| protected void setParent(SyntaxTreeNode parent) Set this syntax tree node's parent node, if unset. For
re-parenting just use
| |
| setParser | back to summary |
|---|---|
| protected void setParser(Parser parser) Set this node's parser. The parser (the XSLT parser) gives this syntax tree node access to the symbol table and XPath parser.
| |
| setPrefixMapping | back to summary |
|---|---|
| protected void setPrefixMapping(Map<String, String> mapping) Sets the prefix mapping for the namespaces that were declared in this element. This does not include all prefix mappings in scope, so one may have to check ancestor elements to get all mappings that are in in scope. The prefixes must be passed in as a Map that maps namespace prefixes (String objects) to namespace URIs (also String). | |
| setQName | back to summary |
|---|---|
| protected void setQName(QName qname) Set the QName for the syntax tree node.
| |
| setQName | back to summary |
|---|---|
| protected void setQName(String uri, String prefix, String localname) Set the QName for the SyntaxTreeNode | |
| translate | back to summary |
|---|---|
| public abstract void translate(ClassGenerator classGen, MethodGenerator methodGen) Translate this abstract syntax tree node into JVM bytecodes.
| |
| translateContents | back to summary |
|---|---|
| protected void translateContents(ClassGenerator classGen, MethodGenerator methodGen) Call translate() on all child syntax tree nodes.
| |
| typeCheck | back to summary |
|---|---|
| public abstract Type typeCheck(SymbolTable stable) throws TypeCheckError Type check the children of this node. The type check phase may add coercions (CastExpr) to the AST.
| |
| typeCheckContents | back to summary |
|---|---|
| protected Type typeCheckContents(SymbolTable stable) throws TypeCheckError Call typeCheck() on all child syntax tree nodes.
| |
| updateScope | back to summary |
|---|---|
| protected QName updateScope(Parser parser, SyntaxTreeNode node) Add a node to the current scope and return name of a variable or parameter if the node represents a variable or a parameter. | |