org.eclipse.jet.compiler
Class XMLElement

java.lang.Object
  extended by org.eclipse.jet.compiler.JET2ASTElement
      extended by org.eclipse.jet.compiler.XMLElement
Direct Known Subclasses:
XMLBodyElement, XMLEmptyElement

public abstract class XMLElement
extends JET2ASTElement

An abstract implementation representing all XML-based elements in the JET2 AST


Method Summary
 java.util.Map getAttributes()
          Return a read-only map of the attributes (name to value map)
 java.lang.String getName()
          Return the QName of the element
 java.lang.String getNSPrefix()
          Return the XML Namespace prefixe of the element
 TagDefinition getTagDefinition()
           
 java.lang.String getTagNCName()
          Return the NCName (unqualified name) of the element.
 boolean removeLineWhenOtherwiseEmpty()
          Indicate whether the the surrounding whitespace, including the trailing new line should be removed from the template output.
 
Methods inherited from class org.eclipse.jet.compiler.JET2ASTElement
accept, getColumn, getEnd, getLine, getNextElement, getParent, getPrevElement, getStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public final java.lang.String getName()
Return the QName of the element

Returns:
a string

getAttributes

public final java.util.Map getAttributes()
Return a read-only map of the attributes (name to value map)

Returns:
a Map with String keys (attribute name) and String values

getTagNCName

public java.lang.String getTagNCName()
Return the NCName (unqualified name) of the element.

Returns:
the name with any XML namespace prefix (prefix:) removed

getNSPrefix

public java.lang.String getNSPrefix()
Return the XML Namespace prefixe of the element

Returns:
the namespace prefix or the empty string if there is no namespace prefix.

getTagDefinition

public final TagDefinition getTagDefinition()
Returns:
Returns the td.

removeLineWhenOtherwiseEmpty

public final boolean removeLineWhenOtherwiseEmpty()
Description copied from class: JET2ASTElement
Indicate whether the the surrounding whitespace, including the trailing new line should be removed from the template output. In general, elements that create output should return false, while element that do should should return true.

Specified by:
removeLineWhenOtherwiseEmpty in class JET2ASTElement
Returns:
true if the containing line should be removed if otherwise empty.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.