|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xml.utils.UnImplNode | +--org.apache.xalan.templates.ElemTemplateElement
**For advanced use only** An instance of this class represents an element inside an xsl:template class. It has a single "execute" method which is expected to perform the given action on the result tree. This class acts like a Element node, and implements the Element interface, but is not a full implementation of that interface... it only implements enough for basic traversal of the tree.
Stylesheet
, Serialized FormConstructor Summary | |
ElemTemplateElement()
Construct a template element instance. |
Method Summary | |
ElemTemplateElement |
appendChild(ElemTemplateElement elem)
Add a child to the child list. |
Node |
appendChild(Node newChild)
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(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)
|
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. |
NodeList |
getChildNodes()
Return the nodelist (same reference). |
int |
getColumnNumber()
Return the column number where the current document event ends. |
java.util.Vector |
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. |
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. |
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix,
Node context)
Fullfill the PrefixResolver interface. |
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. |
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. |
java.util.Vector |
getPrefixes()
Return a table that contains all prefixes available within this element context. |
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()
|
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. |
ElemTemplateElement |
replaceChild(ElemTemplateElement newChildElem,
ElemTemplateElement oldChildElem)
Replace the old child with a new child. |
Node |
replaceChild(Node newChild,
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(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. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ElemTemplateElement()
transformer
- The XSLT TransformerFactory.stylesheetTree
- The owning stylesheet.name
- The name of the element.atts
- The element attributes.lineNumber
- The line in the XSLT file that the element occurs on.columnNumber
- The column index in the XSLT file that the element occurs on.Method Detail |
public boolean isCompiledTemplate()
public int getXSLToken()
Constants
public java.lang.String getNodeName()
public java.lang.String getLocalName()
public void runtimeInit(TransformerImpl transformer) throws TransformerException
transformer
- The XSLT TransformerFactory.public void execute(TransformerImpl transformer) throws TransformerException
transformer
- The XSLT TransformerFactory.sourceNode
- The current context node.mode
- The current mode.public StylesheetComposed getStylesheetComposed()
public Stylesheet getStylesheet()
public StylesheetRoot getStylesheetRoot()
public void recompose(StylesheetRoot root) throws TransformerException
public void compose(StylesheetRoot sroot) throws TransformerException
public void endCompose(StylesheetRoot sroot) throws TransformerException
public void error(java.lang.String msg, java.lang.Object[] args)
msg
- key of the error that occured.args
- Arguments to be used in the messagepublic void error(java.lang.String msg)
public Node appendChild(Node newChild) throws DOMException
newChild
- Child to be added to child listpublic ElemTemplateElement appendChild(ElemTemplateElement elem)
newChild
- Child to be added to child listpublic boolean hasChildNodes()
public short getNodeType()
public NodeList getChildNodes()
public 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 Node replaceChild(Node newChild, Node oldChild) throws DOMException
newChild
- New child to replace witholdChild
- Old child to be replacedpublic Node insertBefore(Node newChild, Node refChild) throws DOMException
newChild
- New child node to insertrefChild
- Insert in front of this childpublic ElemTemplateElement replaceChild(ElemTemplateElement newChildElem, ElemTemplateElement oldChildElem)
newChild
- New child to replace witholdChild
- Old child to be replacedpublic int getLength()
public Node item(int index)
index
- Index of child to findpublic Document getOwnerDocument()
public ElemTemplate getOwnerXSLTemplate()
public java.lang.String getTagName()
public boolean hasTextLitOnly()
public java.lang.String getBaseIdentifier()
public int getEndLineNumber()
getColumnNumber()
public int getLineNumber()
getColumnNumber()
public int getEndColumnNumber()
getLineNumber()
public int getColumnNumber()
getLineNumber()
public java.lang.String getPublicId()
This will be the public identifier
getSystemId()
public java.lang.String getSystemId()
If the system identifier is a URL, the parser must resolve it fully before passing it to the application.
getPublicId()
public void setLocaterInfo(SourceLocator locator)
locator
- Source Locator with location information for this elementpublic void setEndLocaterInfo(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.Vector getDeclaredPrefixes()
public void setPrefixes(NamespaceSupport nsSupport) throws TransformerException
nsSupport
- non-null reference to NamespaceSupport from
the ContentHandler.public void setPrefixes(NamespaceSupport nsSupport, boolean excludeXSLDecl) throws TransformerException
nsSupport
- non-null reference to NamespaceSupport from
the ContentHandler.excludeXSLDecl
- true if XSLT namespaces should be ignored.public java.lang.String getNamespaceForPrefix(java.lang.String prefix, Node context)
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.public java.lang.String getNamespaceForPrefix(java.lang.String prefix)
prefix
- non-null reference to prefix string, which should map
to a namespace URL.public java.util.Vector getPrefixes()
XMLNSDecl
s, which may be null.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 TransformerException
public void setUid(int i)
kIndex
- Index of this child.public int getUid()
public Node getParentNode()
public ElemTemplateElement getParentElem()
public void setParentElem(ElemTemplateElement p)
parent
- This node's parent as an ElemTemplateElementpublic Node getNextSibling()
public Node getPreviousSibling()
public ElemTemplateElement getPreviousSiblingElem()
public ElemTemplateElement getNextSiblingElem()
public ElemTemplateElement getParentNodeElem()
public Node getFirstChild()
public ElemTemplateElement getFirstChildElem()
public Node getLastChild()
public ElemTemplateElement getLastChildElem()
public Node getDOMBackPointer()
public void setDOMBackPointer(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 objectpublic boolean shouldStripWhiteSpace(XPathContext support, Element targetElement) throws TransformerException
support
- The XPath runtime state.targetElement
- Element to checkpublic boolean canStripWhiteSpace()
public boolean canAcceptVariables()
public void exprSetParent(ExpressionNode n)
n
- Must be a ElemTemplateElement.public ExpressionNode exprGetParent()
public void exprAddChild(ExpressionNode n, int i)
n
- Must be a ElemTemplateElement.public ExpressionNode exprGetChild(int i)
public int exprGetNumChildren()
public void callVisitors(XSLTVisitor visitor)
XSLTVisitable.callVisitors(XSLTVisitor)
public boolean handlesNullPrefixes()
PrefixResolver.handlesNullPrefixes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |