|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.xsltc.compiler.SyntaxTreeNode org.apache.xalan.xsltc.compiler.Instruction org.apache.xalan.xsltc.compiler.LiteralElement
final class LiteralElement
Field Summary | |
---|---|
private java.util.Hashtable |
_accessedPrefixes
|
private boolean |
_allAttributesUnique
|
private java.util.Vector |
_attributeElements
|
private LiteralElement |
_literalElemParent
|
private java.lang.String |
_name
|
private static java.lang.String |
XMLNS_STRING
|
Fields inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
---|
_attributes, _parent, _qname, Dummy, IndentIncrement, UNKNOWN_STYLESHEET_NODE_ID |
Constructor Summary | |
---|---|
LiteralElement()
|
Method Summary | |
---|---|
private java.lang.String |
accessedNamespace(java.lang.String prefix)
Returns the namespace URI for which a prefix is pointing to |
void |
addAttribute(SyntaxTreeNode attribute)
Add an attribute to this element |
boolean |
allAttributesUnique()
Return true if all attributes of this LRE have unique names. |
private boolean |
canProduceAttributeNodes(SyntaxTreeNode node,
boolean ignoreXslAttribute)
Return true if the instructions under the given SyntaxTreeNode can produce attribute nodes to an element. |
private boolean |
checkAttributesUnique()
Check whether all attributes are unique. |
protected boolean |
contextDependent()
Returns true if this expression/instruction depends on the context. |
void |
display(int indent)
Displays the contents of this literal element |
ElemDesc |
getElemDesc()
Return the ElemDesc object for an HTML element. |
QName |
getName()
Returns the QName for this literal element |
java.util.Enumeration |
getNamespaceScope(SyntaxTreeNode node)
This method starts at a given node, traverses all namespace mappings, and assembles a list of all prefixes that (for the given node) maps to _ANY_ namespace URI. |
private boolean |
isHTMLOutput()
Return true if the output method is html. |
void |
parseContents(Parser parser)
Determines the final QName for the element and its attributes. |
void |
registerNamespace(java.lang.String prefix,
java.lang.String uri,
SymbolTable stable,
boolean declared)
Method used to keep track of what namespaces that are references by this literal element and its attributes. |
void |
setFirstAttribute(SyntaxTreeNode attribute)
Set the first attribute of this element |
void |
translate(ClassGenerator classGen,
MethodGenerator methodGen)
Compiles code that emits the literal element to the output handler, first the start tag, then namespace declaration, then attributes, then the element contents, and then the element end tag. |
private java.lang.String |
translateQName(QName qname,
SymbolTable stable)
Translates the prefix of a QName according to the rules set in the attributes of xsl:stylesheet. |
Type |
typeCheck(SymbolTable stable)
Type-check the contents of this element. |
Methods inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
---|
addAttribute, addElement, addPrefixMapping, compileResultTree, dependentContents, displayContents, elementAt, elementCount, elements, getAttribute, getAttribute, getAttributes, getContents, getImportPrecedence, getLineNumber, getNodeIDForStylesheetNSLookup, getParent, getParser, getPrefixMapping, getQName, getStylesheet, getSymbolTable, getTemplate, getXSLTC, hasAttribute, hasContents, indent, isDummy, lastChild, lookupNamespace, lookupPrefix, parseChildren, removeElement, reportError, reportWarning, setAttributes, setFirstElement, setLineNumber, setParent, setParser, setPrefixMapping, setQName, setQName, translateContents, typeCheckContents, updateScope |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String _name
private LiteralElement _literalElemParent
private java.util.Vector _attributeElements
private java.util.Hashtable _accessedPrefixes
private boolean _allAttributesUnique
private static final java.lang.String XMLNS_STRING
Constructor Detail |
---|
LiteralElement()
Method Detail |
---|
public QName getName()
public void display(int indent)
display
in class SyntaxTreeNode
indent
- Indentation level for syntax tree levels.private java.lang.String accessedNamespace(java.lang.String prefix)
public void registerNamespace(java.lang.String prefix, java.lang.String uri, SymbolTable stable, boolean declared)
private java.lang.String translateQName(QName qname, SymbolTable stable)
public void addAttribute(SyntaxTreeNode attribute)
public void setFirstAttribute(SyntaxTreeNode attribute)
public Type typeCheck(SymbolTable stable) throws TypeCheckError
typeCheck
in class Instruction
stable
- The compiler/parser's symbol table
TypeCheckError
public java.util.Enumeration getNamespaceScope(SyntaxTreeNode node)
public void parseContents(Parser parser)
parseContents
in class SyntaxTreeNode
parser
- reference to the XSLT parserprotected boolean contextDependent()
SyntaxTreeNode
contextDependent
in class SyntaxTreeNode
public void translate(ClassGenerator classGen, MethodGenerator methodGen)
translate
in class Instruction
classGen
- BCEL Java class generatormethodGen
- BCEL Java method generatorprivate boolean isHTMLOutput()
public ElemDesc getElemDesc()
public boolean allAttributesUnique()
private boolean checkAttributesUnique()
private boolean canProduceAttributeNodes(SyntaxTreeNode node, boolean ignoreXslAttribute)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |