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

pack-priv final Class XslElement

extends Instruction
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.ALOAD, .ASTORE, .ConstantPoolGen, .INVOKESTATIC, .InstructionList, .LocalVariableGen, .PUSH, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator, .ErrorMsg, .MethodGenerator, .Type, .TypeCheckError, .Util, com.sun.org.apache.xml.internal.utils.XML11Char

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private AttributeValueTemplate
private AttributeValueTemplate
private String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
display(int indent)

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

Displays the contents of the element

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
translate(ClassGenerator classGen, MethodGenerator methodGen)

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

At runtime the compilation of xsl:element results in code that: (i) evaluates the avt for the name, (ii) checks for a prefix in the name (iii) generates a new prefix and create a new qname when necessary (iv) calls startElement() on the handler (v) looks up a uri in the XML when the prefix is not known at compile time (vi) calls namespace() on the handler (vii) evaluates the contents (viii) calls endElement().

public void
translateContents(ClassGenerator classGen, MethodGenerator methodGen)

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

Override this method to make sure that xsl:attributes are not copied to output if this xsl:element is to be ignored

public void
translateLiteral(ClassGenerator classGen, MethodGenerator methodGen)

This method is called when the name of the element is known at compile time.

public Type
typeCheck(SymbolTable stable)

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

Run type check on element name & contents

Field Detail

_ignoreback to summary
private boolean _ignore
_isLiteralNameback to summary
private boolean _isLiteralName
_nameback to summary
private AttributeValueTemplate _name
_namespaceback to summary
private AttributeValueTemplate _namespace
_prefixback to summary
private String _prefix

Constructor Detail

XslElementback to summary
pack-priv XslElement()

Method Detail

displayback to summary
public void display(int indent)

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

Displays the contents of the element

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.

translateback to summary
public void translate(ClassGenerator classGen, MethodGenerator methodGen)

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

At runtime the compilation of xsl:element results in code that: (i) evaluates the avt for the name, (ii) checks for a prefix in the name (iii) generates a new prefix and create a new qname when necessary (iv) calls startElement() on the handler (v) looks up a uri in the XML when the prefix is not known at compile time (vi) calls namespace() on the handler (vii) evaluates the contents (viii) calls endElement().

translateContentsback to summary
public void translateContents(ClassGenerator classGen, MethodGenerator methodGen)

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

Override this method to make sure that xsl:attributes are not copied to output if this xsl:element is to be ignored

translateLiteralback to summary
public void translateLiteral(ClassGenerator classGen, MethodGenerator methodGen)

This method is called when the name of the element is known at compile time. In this case, there is no need to inspect the element name at runtime to determine if a prefix exists, needs to be generated, etc.

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

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

Run type check on element name & contents