org.apache.xalan.templates
public class ElemTemplateElement extends UnImplNode implements PrefixResolver, Serializable, ExpressionNode, WhitespaceStrippingElementMatcher, XSLTVisitable
See Also: Stylesheet
UNKNOWN: advanced
Constructor Summary | |
---|---|
ElemTemplateElement()
Construct a template element instance.
|
Method Summary | |
---|---|
Node | appendChild(Node newChild)
Add a child to the child list.
|
ElemTemplateElement | appendChild(ElemTemplateElement elem)
Add a child to the child list.
|
void | callVisitors(XSLTVisitor visitor) |
boolean | canAcceptVariables()
Tell if this element can accept variable declarations. |
boolean | canStripWhiteSpace()
Get information about whether or not whitespace can be stripped. |
int | compareTo(Object o)
Compares this object with the specified object for precedence order.
|
void | compose(StylesheetRoot sroot)
This function is called after everything else has been
recomposed, and allows the template to set remaining
values that may be based on some other property that
depends on recomposition. |
boolean | containsExcludeResultPrefix(String prefix, String uri)
Get whether or not the passed URL is contained flagged by
the "extension-element-prefixes" property. |
void | endCompose(StylesheetRoot sroot)
This after the template's children have been composed. |
void | error(String msg, Object[] args)
Throw a template element runtime error. |
void | error(String msg) |
void | execute(TransformerImpl transformer)
Execute the element's primary function. |
void | exprAddChild(ExpressionNode n, int i)
This method tells the node to add its argument to the node's
list of children. |
ExpressionNode | exprGetChild(int i) This method returns a child node. |
int | exprGetNumChildren() Return the number of children the node has. |
ExpressionNode | exprGetParent()
Get the ExpressionNode parent of this node. |
void | exprSetParent(ExpressionNode n)
Set the parent of this node. |
String | getBaseIdentifier()
Return the base identifier.
|
NodeList | getChildNodes()
Return the nodelist (same reference).
|
int | getColumnNumber()
Return the column number where the current document event ends.
|
List | getDeclaredPrefixes()
Return a table that contains all prefixes available
within this element context.
|
Node | getDOMBackPointer()
If this stylesheet was created from a DOM, get the
DOM backpointer that this element originated from.
|
int | getEndColumnNumber()
Return the column number where the current document event ends.
|
int | getEndLineNumber()
Return the line number where the current document event ends.
|
Node | getFirstChild()
Get the first child as a Node.
|
ElemTemplateElement | getFirstChildElem()
Get the first child as a ElemTemplateElement.
|
Node | getLastChild()
Get the last child.
|
ElemTemplateElement | getLastChildElem()
Get the last child.
|
int | getLength()
NodeList method: Count the immediate children of this node
|
int | getLineNumber()
Return the line number where the current document event ends.
|
String | getLocalName()
For now, just return the result of getNodeName(), which
the local name.
|
String | getNamespaceForPrefix(String prefix, Node context)
Fullfill the PrefixResolver interface. |
String | getNamespaceForPrefix(String prefix)
Given a namespace, get the corrisponding prefix.
|
Node | getNextSibling()
Get the next sibling (as a Node) or return null.
|
ElemTemplateElement | getNextSiblingElem()
Get the next sibling (as a ElemTemplateElement) or return null.
|
String | getNodeName()
Return the node name.
|
short | getNodeType()
Get the type of the node.
|
Document | getOwnerDocument()
Get the stylesheet owner.
|
ElemTemplate | getOwnerXSLTemplate()
Get the owning xsl:template element.
|
ElemTemplateElement | getParentElem()
Get the parent as an ElemTemplateElement.
|
Node | getParentNode()
Get the parent as a Node.
|
ElemTemplateElement | getParentNodeElem()
Get the parent element.
|
Node | getPreviousSibling()
Get the previous sibling (as a Node) or return null.
|
ElemTemplateElement | getPreviousSiblingElem()
Get the previous sibling (as a Node) or return null.
|
String | getPublicId()
Return the public identifier for the current document event.
|
Stylesheet | getStylesheet()
Get the owning stylesheet. |
StylesheetComposed | getStylesheetComposed()
Get the owning "composed" stylesheet. |
StylesheetRoot | getStylesheetRoot()
Get the owning root stylesheet. |
String | getSystemId()
Return the system identifier for the current document event.
|
String | getTagName()
Return the element name.
|
int | getUid()
Get the UID (document order index).
|
boolean | getXmlSpace()
Get the "xml:space" attribute.
|
int | getXSLToken()
Get an integer representation of the element type.
|
boolean | handlesNullPrefixes() |
boolean | hasChildNodes()
Tell if there are child nodes.
|
boolean | hasTextLitOnly()
Tell if this element only has one text child, for optimization purposes. |
boolean | hasVariableDecl() |
Node | insertBefore(Node newChild, Node refChild)
Unimplemented. |
boolean | isCompiledTemplate()
Tell if this template is a compiled template.
|
Node | item(int index)
NodeList method: Return the Nth immediate child of this node, or
null if the index is out of bounds.
|
void | recompose(StylesheetRoot root)
This function is called during recomposition to
control how this element is composed. |
ElemTemplateElement | removeChild(ElemTemplateElement childETE)
Remove a child.
|
Node | replaceChild(Node newChild, Node oldChild)
Replace the old child with a new child.
|
ElemTemplateElement | replaceChild(ElemTemplateElement newChildElem, ElemTemplateElement oldChildElem)
Replace the old child with a new child.
|
void | resolvePrefixTables()
Combine the parent's namespaces with this namespace
for fast processing, taking care to reference the
parent's namespace if this namespace adds nothing new.
|
void | runtimeInit(TransformerImpl transformer)
This function will be called on top-level elements
only, just before the transform begins.
|
void | setDOMBackPointer(Node n)
If this stylesheet was created from a DOM, set the
DOM backpointer that this element originated from.
|
void | setEndLocaterInfo(SourceLocator locator)
Set the end location information for this element.
|
void | setLocaterInfo(SourceLocator locator)
Set the location information for this element.
|
void | setParentElem(ElemTemplateElement p)
Set the parent as an ElemTemplateElement.
|
void | setPrefixes(NamespaceSupport nsSupport)
From the SAX2 helper class, set the namespace table for
this element. |
void | setPrefixes(NamespaceSupport nsSupport, boolean excludeXSLDecl)
Copy the namespace declarations from the NamespaceSupport object.
|
void | setUid(int i)
Set the UID (document order index).
|
void | setXmlSpace(int v)
Set the "xml:space" attribute.
|
boolean | shouldStripWhiteSpace(XPathContext support, Element targetElement)
Get information about whether or not an element should strip whitespace. |
Parameters: newChild Child to be added to child list
Returns: Child just added to the child list
Throws: DOMException
Parameters: elem Child to be added to child list
Returns: Child just added to the child list
See Also: callVisitors
Returns: true if the element can accept and process variable declarations.
Returns: true if the whitespace can be stripped.
See Also: strip in XSLT Specification
Parameters: o The object to be compared to this object
Returns: a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws: ClassCastException if the specified object's type prevents it from being compared to this Object.
Parameters: prefix non-null reference to prefix that might be excluded.
Returns: true if the prefix should normally be excluded.
See Also: extension-element in XSLT Specification
Parameters: msg key of the error that occured. args Arguments to be used in the message
Parameters: transformer The XSLT TransformerFactory.
Throws: TransformerException if any checked exception occurs.
Parameters: n Must be a ElemTemplateElement.
Parameters: n Must be a ElemTemplateElement.
Returns: The base identifier
Returns: The nodelist containing the child nodes (this)
Returns: The column number, or -1 if none is available.
See Also: ElemTemplateElement
Returns: Vector containing the prefixes available within this element context
Returns: DOM backpointer that this element originated from or null.
Returns: The column number, or -1 if none is available.
See Also: ElemTemplateElement
Returns: The line number, or -1 if none is available.
See Also: ElemTemplateElement
Returns: This node's first child or null
Returns: This node's first child (as a ElemTemplateElement) or null
Returns: This node's last child
Returns: This node's last child
Returns: The count of children of this node
Returns: The line number, or -1 if none is available.
See Also: ElemTemplateElement
Returns: The result of getNodeName().
Parameters: prefix The prefix to look up, which may be an empty string ("") for the default Namespace. context The node context from which to look up the URI.
Returns: null if the error listener does not choose to throw an exception.
Parameters: prefix non-null reference to prefix string, which should map to a namespace URL.
Returns: The namespace URL that the prefix maps to, or null if no mapping can be found.
Returns: this node's next sibling or null
Returns: This node's next sibling (as a ElemTemplateElement) or null
Returns: An invalid node name
Returns: Constant for this node type
Returns: The stylesheet owner
Returns: The owning xsl:template element, this element if it is a xsl:template, or null if not found.
Returns: This node's parent as an ElemTemplateElement
Returns: This node's parent node
Returns: This node's next parent (as a ElemTemplateElement) or null
Returns: This node's previous sibling or null
Returns: This node's previous sibling or null
This will be the public identifier
Returns: A string containing the public identifier, or null if none is available.
See Also: ElemTemplateElement
Returns: the owning stylesheet
Returns: the owning "composed" stylesheet.
Returns: the owning root stylesheet
If the system identifier is a URL, the parser must resolve it fully before passing it to the application.
Returns: A string containing the system identifier, or null if none is available.
See Also: ElemTemplateElement
Returns: The element name
Returns: Index of this child
Returns: The value of the xml:space attribute
See Also: strip in XSLT Specification
section-Creating-Text in XSLT Specification
Returns: An integer representation of the element, defined in the Constants class.
See Also: Constants
See Also: handlesNullPrefixes
Returns: True if there are child nodes
Returns: true of this element only has one text literal child.
Parameters: newChild New child node to insert refChild Insert in front of this child
Returns: null
Throws: DOMException
Returns: Boolean flag indicating whether this is a compiled template
Parameters: index Index of child to find
Returns: org.w3c.dom.Node: the child node at given index
Parameters: childETE The child to remove. This operation is a no-op if oldChild is not a child of this node.
Returns: the removed child, or null if the specified node was not a child of this element.
Parameters: newChild New child to replace with oldChild Old child to be replaced
Returns: The new child
Throws: DOMException
Parameters: newChildElem New child to replace with oldChildElem Old child to be replaced
Returns: The new child
Throws: DOMException
Throws: TransformerException
Parameters: transformer The XSLT TransformerFactory.
Throws: TransformerException
Parameters: n DOM backpointer that this element originated from.
Parameters: locator Source Locator with location information for this element
Parameters: locator Source Locator with location information for this element
Parameters: p This node's parent as an ElemTemplateElement
Parameters: nsSupport non-null reference to NamespaceSupport from the ContentHandler.
Throws: TransformerException
Parameters: nsSupport non-null reference to NamespaceSupport from the ContentHandler. excludeXSLDecl true if XSLT namespaces should be ignored.
Throws: TransformerException
Parameters: i Index of this child.
Parameters: v Enumerated value, either Constants.ATTRVAL_PRESERVE or Constants.ATTRVAL_STRIP.
See Also: strip in XSLT Specification
section-Creating-Text in XSLT Specification
Parameters: support The XPath runtime state. targetElement Element to check
Returns: true if the whitespace should be stripped.
Throws: TransformerException
See Also: strip in XSLT Specification