public class ElemTemplateElement extends UnImplNode implements PrefixResolver, java.io.Serializable, ExpressionNode, WhitespaceStrippingElementMatcher, XSLTVisitable
Stylesheet,
Serialized FormATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
ElemTemplateElement()
Construct a template element instance.
|
| Modifier and Type | Method and Description |
|---|---|
ElemTemplateElement |
appendChild(ElemTemplateElement elem)
Add a child to the child list.
|
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
Add a child to the child list.
|
void |
callVisitors(XSLTVisitor visitor)
This will traverse the heararchy, calling the visitor for
each member.
|
boolean |
canAcceptVariables()
Tell if this element can accept variable declarations.
|
boolean |
canStripWhiteSpace()
Get information about whether or not whitespace can be stripped.
|
int |
compareTo(java.lang.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(java.lang.String prefix,
java.lang.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(java.lang.String msg)
Throw an error.
|
void |
error(java.lang.String msg,
java.lang.Object[] args)
Throw a template element runtime error.
|
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.
|
java.lang.String |
getBaseIdentifier()
Return the base identifier.
|
org.w3c.dom.NodeList |
getChildNodes()
Return the nodelist (same reference).
|
int |
getColumnNumber()
Return the column number where the current document event ends.
|
java.util.List |
getDeclaredPrefixes()
Return a table that contains all prefixes available
within this element context.
|
org.w3c.dom.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.
|
org.w3c.dom.Node |
getFirstChild()
Get the first child as a Node.
|
ElemTemplateElement |
getFirstChildElem()
Get the first child as a ElemTemplateElement.
|
org.w3c.dom.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.
|
java.lang.String |
getLocalName()
For now, just return the result of getNodeName(), which
the local name.
|
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix)
Given a namespace, get the corrisponding prefix.
9/15/00: This had been iteratively examining the m_declaredPrefixes
field for this node and its parents.
|
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix,
org.w3c.dom.Node context)
Fullfill the PrefixResolver interface.
|
org.w3c.dom.Node |
getNextSibling()
Get the next sibling (as a Node) or return null.
|
ElemTemplateElement |
getNextSiblingElem()
Get the next sibling (as a ElemTemplateElement) or return null.
|
java.lang.String |
getNodeName()
Return the node name.
|
short |
getNodeType()
Get the type of the node.
|
org.w3c.dom.Document |
getOwnerDocument()
Get the stylesheet owner.
|
ElemTemplate |
getOwnerXSLTemplate()
Get the owning xsl:template element.
|
ElemTemplateElement |
getParentElem()
Get the parent as an ElemTemplateElement.
|
org.w3c.dom.Node |
getParentNode()
Get the parent as a Node.
|
ElemTemplateElement |
getParentNodeElem()
Get the parent element.
|
org.w3c.dom.Node |
getPreviousSibling()
Get the previous sibling (as a Node) or return null.
|
ElemTemplateElement |
getPreviousSiblingElem()
Get the previous sibling (as a Node) or return null.
|
java.lang.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.
|
java.lang.String |
getSystemId()
Return the system identifier for the current document event.
|
java.lang.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() |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
Unimplemented.
|
boolean |
isCompiledTemplate()
Tell if this template is a compiled template.
|
org.w3c.dom.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.
|
ElemTemplateElement |
replaceChild(ElemTemplateElement newChildElem,
ElemTemplateElement oldChildElem)
Replace the old child with a new child.
|
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
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(org.w3c.dom.Node n)
If this stylesheet was created from a DOM, set the
DOM backpointer that this element originated from.
|
void |
setEndLocaterInfo(javax.xml.transform.SourceLocator locator)
Set the end location information for this element.
|
void |
setLocaterInfo(javax.xml.transform.SourceLocator locator)
Set the location information for this element.
|
void |
setParentElem(ElemTemplateElement p)
Set the parent as an ElemTemplateElement.
|
void |
setPrefixes(org.xml.sax.helpers.NamespaceSupport nsSupport)
From the SAX2 helper class, set the namespace table for
this element.
|
void |
setPrefixes(org.xml.sax.helpers.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,
org.w3c.dom.Element targetElement)
Get information about whether or not an element should strip whitespace.
|
adoptNode, appendData, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, getActualEncoding, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getInputEncoding, getNamespaceURI, getNodeValue, getOwnerElement, getPrefix, getSchemaTypeInfo, getSpecified, getStrictErrorChecking, getTextContent, getUserData, getWholeText, getXmlEncoding, getXmlStandalone, getXmlVersion, hasAttribute, hasAttributeNS, hasAttributes, importNode, insertData, isDefaultNamespace, isEqualNode, isId, isSameNode, isSupported, isWhitespaceInElementContent, lookupNamespaceURI, lookupPrefix, normalize, normalizeDocument, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, renameNode, replaceData, replaceWholeText, setActualEncoding, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setDocumentURI, setIdAttribute, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInputEncoding, setNodeValue, setPrefix, setStrictErrorChecking, setTextContent, setUserData, setValue, setXmlEncoding, setXmlStandalone, setXmlVersion, splitText, substringDatapublic ElemTemplateElement()
public boolean isCompiledTemplate()
public int getXSLToken()
Constantspublic java.lang.String getNodeName()
getNodeName in interface org.w3c.dom.NodegetNodeName in class UnImplNodepublic java.lang.String getLocalName()
getLocalName in interface org.w3c.dom.NodegetLocalName in class UnImplNodepublic void runtimeInit(TransformerImpl transformer) throws javax.xml.transform.TransformerException
transformer - The XSLT TransformerFactory.javax.xml.transform.TransformerExceptionpublic void execute(TransformerImpl transformer) throws javax.xml.transform.TransformerException
transformer - The XSLT TransformerFactory.javax.xml.transform.TransformerException - if any checked exception occurs.public StylesheetComposed getStylesheetComposed()
public Stylesheet getStylesheet()
public StylesheetRoot getStylesheetRoot()
public void recompose(StylesheetRoot root) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionpublic void compose(StylesheetRoot sroot) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionpublic void endCompose(StylesheetRoot sroot) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionpublic void error(java.lang.String msg,
java.lang.Object[] args)
error in class UnImplNodemsg - key of the error that occured.args - Arguments to be used in the messagepublic void error(java.lang.String msg)
UnImplNodeerror in class UnImplNodemsg - Message Key for the errorpublic org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
throws org.w3c.dom.DOMException
appendChild in interface org.w3c.dom.NodeappendChild in class UnImplNodenewChild - Child to be added to child listorg.w3c.dom.DOMExceptionpublic ElemTemplateElement appendChild(ElemTemplateElement elem)
elem - Child to be added to child listpublic boolean hasChildNodes()
hasChildNodes in interface org.w3c.dom.NodehasChildNodes in class UnImplNodepublic short getNodeType()
getNodeType in interface org.w3c.dom.NodegetNodeType in class UnImplNodepublic org.w3c.dom.NodeList getChildNodes()
getChildNodes in interface org.w3c.dom.NodegetChildNodes in class UnImplNodepublic ElemTemplateElement removeChild(ElemTemplateElement childETE)
childETE - The child to remove. This operation is a no-op
if oldChild is not a child of this node.public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
throws org.w3c.dom.DOMException
replaceChild in interface org.w3c.dom.NodereplaceChild in class UnImplNodenewChild - New child to replace witholdChild - Old child to be replacedorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
throws org.w3c.dom.DOMException
insertBefore in interface org.w3c.dom.NodeinsertBefore in class UnImplNodenewChild - New child node to insertrefChild - Insert in front of this childorg.w3c.dom.DOMExceptionpublic ElemTemplateElement replaceChild(ElemTemplateElement newChildElem, ElemTemplateElement oldChildElem)
newChildElem - New child to replace witholdChildElem - Old child to be replacedorg.w3c.dom.DOMExceptionpublic int getLength()
getLength in interface org.w3c.dom.NodeListgetLength in class UnImplNodepublic org.w3c.dom.Node item(int index)
item in interface org.w3c.dom.NodeListitem in class UnImplNodeindex - Index of child to findpublic org.w3c.dom.Document getOwnerDocument()
getOwnerDocument in interface org.w3c.dom.NodegetOwnerDocument in class UnImplNodepublic ElemTemplate getOwnerXSLTemplate()
public java.lang.String getTagName()
getTagName in interface org.w3c.dom.ElementgetTagName in class UnImplNodepublic boolean hasTextLitOnly()
public java.lang.String getBaseIdentifier()
getBaseIdentifier in interface PrefixResolverpublic int getEndLineNumber()
getColumnNumber()public int getLineNumber()
getLineNumber in interface javax.xml.transform.SourceLocatorgetColumnNumber()public int getEndColumnNumber()
getLineNumber()public int getColumnNumber()
getColumnNumber in interface javax.xml.transform.SourceLocatorgetLineNumber()public java.lang.String getPublicId()
This will be the public identifier
getPublicId in interface javax.xml.transform.SourceLocatorgetSystemId()public java.lang.String getSystemId()
If the system identifier is a URL, the parser must resolve it fully before passing it to the application.
getSystemId in interface javax.xml.transform.SourceLocatorgetPublicId()public void setLocaterInfo(javax.xml.transform.SourceLocator locator)
locator - Source Locator with location information for this elementpublic void setEndLocaterInfo(javax.xml.transform.SourceLocator locator)
locator - Source Locator with location information for this elementpublic boolean hasVariableDecl()
public void setXmlSpace(int v)
v - Enumerated value, either Constants.ATTRVAL_PRESERVE
or Constants.ATTRVAL_STRIP.public boolean getXmlSpace()
public java.util.List getDeclaredPrefixes()
public void setPrefixes(org.xml.sax.helpers.NamespaceSupport nsSupport)
throws javax.xml.transform.TransformerException
nsSupport - non-null reference to NamespaceSupport from
the ContentHandler.javax.xml.transform.TransformerExceptionpublic void setPrefixes(org.xml.sax.helpers.NamespaceSupport nsSupport,
boolean excludeXSLDecl)
throws javax.xml.transform.TransformerException
nsSupport - non-null reference to NamespaceSupport from
the ContentHandler.excludeXSLDecl - true if XSLT namespaces should be ignored.javax.xml.transform.TransformerExceptionpublic java.lang.String getNamespaceForPrefix(java.lang.String prefix,
org.w3c.dom.Node context)
getNamespaceForPrefix in interface PrefixResolverprefix - 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.public java.lang.String getNamespaceForPrefix(java.lang.String prefix)
getNamespaceForPrefix in interface PrefixResolverprefix - non-null reference to prefix string, which should map
to a namespace URL.public boolean containsExcludeResultPrefix(java.lang.String prefix,
java.lang.String uri)
ElemLiteralResult.containsExcludeResultPrefix(java.lang.String, java.lang.String).prefix - non-null reference to prefix that might be excluded.public void resolvePrefixTables()
throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionpublic void setUid(int i)
i - Index of this child.public int getUid()
public org.w3c.dom.Node getParentNode()
getParentNode in interface org.w3c.dom.NodegetParentNode in class UnImplNodepublic ElemTemplateElement getParentElem()
public void setParentElem(ElemTemplateElement p)
p - This node's parent as an ElemTemplateElementpublic org.w3c.dom.Node getNextSibling()
getNextSibling in interface org.w3c.dom.NodegetNextSibling in class UnImplNodepublic org.w3c.dom.Node getPreviousSibling()
getPreviousSibling in interface org.w3c.dom.NodegetPreviousSibling in class UnImplNodepublic ElemTemplateElement getPreviousSiblingElem()
public ElemTemplateElement getNextSiblingElem()
public ElemTemplateElement getParentNodeElem()
public org.w3c.dom.Node getFirstChild()
getFirstChild in interface org.w3c.dom.NodegetFirstChild in class UnImplNodepublic ElemTemplateElement getFirstChildElem()
public org.w3c.dom.Node getLastChild()
getLastChild in interface org.w3c.dom.NodegetLastChild in class UnImplNodepublic ElemTemplateElement getLastChildElem()
public org.w3c.dom.Node getDOMBackPointer()
public void setDOMBackPointer(org.w3c.dom.Node n)
n - DOM backpointer that this element originated from.public int compareTo(java.lang.Object o)
throws java.lang.ClassCastException
o - The object to be compared to this objectjava.lang.ClassCastException - if the specified object's
type prevents it from being compared to this Object.public boolean shouldStripWhiteSpace(XPathContext support, org.w3c.dom.Element targetElement) throws javax.xml.transform.TransformerException
shouldStripWhiteSpace in interface WhitespaceStrippingElementMatchersupport - The XPath runtime state.targetElement - Element to checkjavax.xml.transform.TransformerExceptionpublic boolean canStripWhiteSpace()
canStripWhiteSpace in interface WhitespaceStrippingElementMatcherpublic boolean canAcceptVariables()
public void exprSetParent(ExpressionNode n)
exprSetParent in interface ExpressionNoden - Must be a ElemTemplateElement.public ExpressionNode exprGetParent()
exprGetParent in interface ExpressionNodepublic void exprAddChild(ExpressionNode n, int i)
exprAddChild in interface ExpressionNoden - Must be a ElemTemplateElement.public ExpressionNode exprGetChild(int i)
exprGetChild in interface ExpressionNodepublic int exprGetNumChildren()
exprGetNumChildren in interface ExpressionNodepublic void callVisitors(XSLTVisitor visitor)
XSLTVisitablecallVisitors in interface XSLTVisitablevisitor - The visitor whose appropriate method will be called.XSLTVisitable.callVisitors(XSLTVisitor)public boolean handlesNullPrefixes()
handlesNullPrefixes in interface PrefixResolverPrefixResolver.handlesNullPrefixes()Copyright © 2023 Apache XML Project. All Rights Reserved.