|
|||||||||
| Home >> All >> org >> apache >> xalan >> [ templates overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.xalan.templates
Class ElemTemplateElement

java.lang.Objectorg.apache.xml.utils.UnImplNode
org.apache.xalan.templates.ElemTemplateElement
- All Implemented Interfaces:
- org.w3c.dom.Document, org.w3c.dom.Element, org.apache.xpath.ExpressionNode, org.w3c.dom.Node, org.w3c.dom.NodeList, org.apache.xml.utils.PrefixResolver, java.io.Serializable, javax.xml.transform.SourceLocator, org.apache.xpath.WhitespaceStrippingElementMatcher, XSLTVisitable
- Direct Known Subclasses:
- DecimalFormatProperties, ElemApplyImport, ElemChoose, ElemComment, ElemCopyOf, ElemEmpty, ElemExtensionDecl, ElemExtensionScript, ElemFallback, ElemForEach, ElemIf, ElemMessage, ElemNumber, ElemOtherwise, ElemPI, ElemSort, ElemTemplate, ElemText, ElemTextLiteral, ElemUse, ElemValueOf, ElemVariable, ElemWhen, ElemWithParam, KeyDeclaration, NamespaceAlias, OutputProperties, Stylesheet
- public class ElemTemplateElement
- extends org.apache.xml.utils.UnImplNode
- implements org.apache.xml.utils.PrefixResolver, java.io.Serializable, org.apache.xpath.ExpressionNode, org.apache.xpath.WhitespaceStrippingElementMatcher, XSLTVisitable
- extends org.apache.xml.utils.UnImplNode
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.
| Field Summary | |
private int |
m_columnNumber
the column number where the current document event ends. |
private java.util.Vector |
m_declaredPrefixes
The list of namespace declarations for this element only. |
private boolean |
m_defaultSpace
Tell if this element has the default space handling turned off or on according to the xml:space attribute. |
protected int |
m_docOrderNumber
The *relative* document order number of this element. |
private org.w3c.dom.Node |
m_DOMBackPointer
DOM backpointer that this element originated from. |
private int |
m_endColumnNumber
the column number where the current document event ends. |
private int |
m_endLineNumber
line number where the current document event ends. |
(package private) ElemTemplateElement |
m_firstChild
First child. |
private boolean |
m_hasTextLitOnly
Tell if this element only has one text child, for optimization purposes. |
protected boolean |
m_hasVariableDecl
Tell if this element only has one text child, for optimization purposes. |
private int |
m_lineNumber
line number where the current document event ends. |
(package private) ElemTemplateElement |
m_nextSibling
Next sibling. |
protected ElemTemplateElement |
m_parentNode
Parent node. |
(package private) java.util.Vector |
m_prefixTable
The table of XMLNSDecls for this element and all parent elements, screened for excluded prefixes. |
| Constructor Summary | |
ElemTemplateElement()
Construct a template element instance. |
|
| Method Summary | |
protected boolean |
accept(XSLTVisitor visitor)
Accept a visitor and call the appropriate method for this class. |
(package private) void |
addOrReplaceDecls(XMLNSDecl newDecl)
Add or replace this namespace declaration in list of namespaces in scope for this element. |
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. |
protected void |
callChildVisitors(XSLTVisitor visitor)
Call the children visitors. |
protected void |
callChildVisitors(XSLTVisitor visitor,
boolean callAttributes)
Call the children visitors. |
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. |
private boolean |
excludeResultNSDecl(java.lang.String prefix,
java.lang.String uri)
Tell if the result namespace decl should be excluded. |
void |
execute(org.apache.xalan.transformer.TransformerImpl transformer)
Execute the element's primary function. |
(package private) void |
executeNSDecls(org.apache.xalan.transformer.TransformerImpl transformer)
Send startPrefixMapping events to the result tree handler for all declared prefix mappings in the stylesheet. |
(package private) void |
executeNSDecls(org.apache.xalan.transformer.TransformerImpl transformer,
java.lang.String ignorePrefix)
Send startPrefixMapping events to the result tree handler for all declared prefix mappings in the stylesheet. |
void |
exprAddChild(org.apache.xpath.ExpressionNode n,
int i)
This method tells the node to add its argument to the node's list of children. |
org.apache.xpath.ExpressionNode |
exprGetChild(int i)
This method returns a child node. |
int |
exprGetNumChildren()
Return the number of children the node has. |
org.apache.xpath.ExpressionNode |
exprGetParent()
Get the ExpressionNode parent of this node. |
void |
exprSetParent(org.apache.xpath.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.Vector |
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. |
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. |
java.util.Vector |
getPrefixes()
Return a table that contains all prefixes available within this element context. |
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. |
(package private) boolean |
needToCheckExclude()
Return whether we need to check namespace prefixes against and exclude result prefixes list. |
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(org.apache.xalan.transformer.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(org.apache.xpath.XPathContext support,
org.w3c.dom.Element targetElement)
Get information about whether or not an element should strip whitespace. |
(package private) void |
unexecuteNSDecls(org.apache.xalan.transformer.TransformerImpl transformer)
Send endPrefixMapping events to the result tree handler for all declared prefix mappings in the stylesheet. |
(package private) void |
unexecuteNSDecls(org.apache.xalan.transformer.TransformerImpl transformer,
java.lang.String ignorePrefix)
Send endPrefixMapping events to the result tree handler for all declared prefix mappings in the stylesheet. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
compareDocumentPosition, getBaseURI, getFeature, getTextContent, getUserData, isDefaultNamespace, isEqualNode, isSameNode, lookupNamespaceURI, lookupPrefix, setTextContent, setUserData |
| Methods inherited from interface org.w3c.dom.Element |
getSchemaTypeInfo, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
| Methods inherited from interface org.w3c.dom.Document |
getDocumentURI, getDomConfig, getInputEncoding, getXmlEncoding, getXmlStandalone, getXmlVersion, normalizeDocument, renameNode, setDocumentURI, setXmlStandalone, setXmlVersion |
| Field Detail |
m_lineNumber
private int m_lineNumber
- line number where the current document event ends.
m_endLineNumber
private int m_endLineNumber
- line number where the current document event ends.
m_columnNumber
private int m_columnNumber
- the column number where the current document event ends.
m_endColumnNumber
private int m_endColumnNumber
- the column number where the current document event ends.
m_defaultSpace
private boolean m_defaultSpace
- Tell if this element has the default space handling
turned off or on according to the xml:space attribute.
m_hasTextLitOnly
private boolean m_hasTextLitOnly
- Tell if this element only has one text child, for optimization purposes.
m_hasVariableDecl
protected boolean m_hasVariableDecl
- Tell if this element only has one text child, for optimization purposes.
m_declaredPrefixes
private java.util.Vector m_declaredPrefixes
- The list of namespace declarations for this element only.
m_prefixTable
java.util.Vector m_prefixTable
- The table of XMLNSDecls for this element
and all parent elements, screened for excluded prefixes.
m_docOrderNumber
protected int m_docOrderNumber
- The *relative* document order number of this element.
m_parentNode
protected ElemTemplateElement m_parentNode
- Parent node.
m_nextSibling
ElemTemplateElement m_nextSibling
- Next sibling.
m_firstChild
ElemTemplateElement m_firstChild
- First child.
m_DOMBackPointer
private transient org.w3c.dom.Node m_DOMBackPointer
- DOM backpointer that this element originated from.
| Constructor Detail |
ElemTemplateElement
public ElemTemplateElement()
- Construct a template element instance.
| Method Detail |
isCompiledTemplate
public boolean isCompiledTemplate()
- Tell if this template is a compiled template.
getXSLToken
public int getXSLToken()
- Get an integer representation of the element type.
getNodeName
public java.lang.String getNodeName()
- Return the node name.
- Specified by:
getNodeNamein interfaceorg.w3c.dom.Node
getLocalName
public java.lang.String getLocalName()
- For now, just return the result of getNodeName(), which
the local name.
- Specified by:
getLocalNamein interfaceorg.w3c.dom.Node
runtimeInit
public void runtimeInit(org.apache.xalan.transformer.TransformerImpl transformer) throws javax.xml.transform.TransformerException
- This function will be called on top-level elements
only, just before the transform begins.
execute
public void execute(org.apache.xalan.transformer.TransformerImpl transformer) throws javax.xml.transform.TransformerException
- Execute the element's primary function. Subclasses of this
function may recursivly execute down the element tree.
getStylesheetComposed
public StylesheetComposed getStylesheetComposed()
- Get the owning "composed" stylesheet. This looks up the
inheritance chain until it calls getStylesheetComposed
on a Stylesheet object, which will Get the owning
aggregated stylesheet, or that stylesheet if it is aggregated.
getStylesheet
public Stylesheet getStylesheet()
- Get the owning stylesheet. This looks up the
inheritance chain until it calls getStylesheet
on a Stylesheet object, which will return itself.
getStylesheetRoot
public StylesheetRoot getStylesheetRoot()
- Get the owning root stylesheet. This looks up the
inheritance chain until it calls StylesheetRoot
on a Stylesheet object, which will return a reference
to the root stylesheet.
recompose
public void recompose(StylesheetRoot root) throws javax.xml.transform.TransformerException
- This function is called during recomposition to
control how this element is composed.
compose
public void compose(StylesheetRoot sroot) throws javax.xml.transform.TransformerException
- 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.
endCompose
public void endCompose(StylesheetRoot sroot) throws javax.xml.transform.TransformerException
- This after the template's children have been composed.
error
public void error(java.lang.String msg, java.lang.Object[] args)
- Throw a template element runtime error. (Note: should we throw a TransformerException instead?)
error
public void error(java.lang.String msg)
- Description copied from class:
org.apache.xml.utils.UnImplNode - Throw an error.
appendChild
public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException
- Add a child to the child list.
NOTE: This presumes the child did not previously have a parent.
Making that assumption makes this a less expensive operation -- but
requires that if you *do* want to reparent a node, you use removeChild()
first to remove it from its previous context. Failing to do so will
damage the tree.
- Specified by:
appendChildin interfaceorg.w3c.dom.Node
appendChild
public ElemTemplateElement appendChild(ElemTemplateElement elem)
- Add a child to the child list.
NOTE: This presumes the child did not previously have a parent.
Making that assumption makes this a less expensive operation -- but
requires that if you *do* want to reparent a node, you use removeChild()
first to remove it from its previous context. Failing to do so will
damage the tree.
hasChildNodes
public boolean hasChildNodes()
- Tell if there are child nodes.
- Specified by:
hasChildNodesin interfaceorg.w3c.dom.Node
getNodeType
public short getNodeType()
- Get the type of the node.
- Specified by:
getNodeTypein interfaceorg.w3c.dom.Node
getChildNodes
public org.w3c.dom.NodeList getChildNodes()
- Return the nodelist (same reference).
- Specified by:
getChildNodesin interfaceorg.w3c.dom.Node
removeChild
public ElemTemplateElement removeChild(ElemTemplateElement childETE)
- Remove a child.
ADDED 9/8/200 to support compilation.
TODO: ***** Alternative is "removeMe() from my parent if any"
... which is less well checked, but more convenient in some cases.
Given that we assume only experts are calling this class, it might
be preferable. It's less DOMish, though.
replaceChild
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
- Replace the old child with a new child.
- Specified by:
replaceChildin interfaceorg.w3c.dom.Node
insertBefore
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
- Unimplemented. See org.w3c.dom.Node
- Specified by:
insertBeforein interfaceorg.w3c.dom.Node
replaceChild
public ElemTemplateElement replaceChild(ElemTemplateElement newChildElem, ElemTemplateElement oldChildElem)
- Replace the old child with a new child.
getLength
public int getLength()
- NodeList method: Count the immediate children of this node
- Specified by:
getLengthin interfaceorg.w3c.dom.NodeList
item
public 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.
- Specified by:
itemin interfaceorg.w3c.dom.NodeList
getOwnerDocument
public org.w3c.dom.Document getOwnerDocument()
- Get the stylesheet owner.
- Specified by:
getOwnerDocumentin interfaceorg.w3c.dom.Node
getOwnerXSLTemplate
public ElemTemplate getOwnerXSLTemplate()
- Get the owning xsl:template element.
getTagName
public java.lang.String getTagName()
- Return the element name.
- Specified by:
getTagNamein interfaceorg.w3c.dom.Element
hasTextLitOnly
public boolean hasTextLitOnly()
- Tell if this element only has one text child, for optimization purposes.
getBaseIdentifier
public java.lang.String getBaseIdentifier()
- Return the base identifier.
- Specified by:
getBaseIdentifierin interfaceorg.apache.xml.utils.PrefixResolver
getEndLineNumber
public int getEndLineNumber()
- Return the line number where the current document event ends.
Note that this is the line position of the first character
after the text associated with the document event.
getLineNumber
public int getLineNumber()
- Return the line number where the current document event ends.
Note that this is the line position of the first character
after the text associated with the document event.
- Specified by:
getLineNumberin interfacejavax.xml.transform.SourceLocator
getEndColumnNumber
public int getEndColumnNumber()
- Return the column number where the current document event ends.
Note that this is the column number of the first
character after the text associated with the document
event. The first column in a line is position 1.
getColumnNumber
public int getColumnNumber()
- Return the column number where the current document event ends.
Note that this is the column number of the first
character after the text associated with the document
event. The first column in a line is position 1.
- Specified by:
getColumnNumberin interfacejavax.xml.transform.SourceLocator
getPublicId
public java.lang.String getPublicId()
- Return the public identifier for the current document event.
This will be the public identifier
- Specified by:
getPublicIdin interfacejavax.xml.transform.SourceLocator
getSystemId
public java.lang.String getSystemId()
- Return the system identifier for the current document event.
If the system identifier is a URL, the parser must resolve it fully before passing it to the application.
- Specified by:
getSystemIdin interfacejavax.xml.transform.SourceLocator
setLocaterInfo
public void setLocaterInfo(javax.xml.transform.SourceLocator locator)
- Set the location information for this element.
setEndLocaterInfo
public void setEndLocaterInfo(javax.xml.transform.SourceLocator locator)
- Set the end location information for this element.
hasVariableDecl
public boolean hasVariableDecl()
setXmlSpace
public void setXmlSpace(int v)
- Set the "xml:space" attribute.
A text node is preserved if an ancestor element of the text node
has an xml:space attribute with a value of preserve, and
no closer ancestor element has xml:space with a value of default.
getXmlSpace
public boolean getXmlSpace()
- Get the "xml:space" attribute.
A text node is preserved if an ancestor element of the text node
has an xml:space attribute with a value of preserve, and
no closer ancestor element has xml:space with a value of default.
getDeclaredPrefixes
public java.util.Vector getDeclaredPrefixes()
- Return a table that contains all prefixes available
within this element context.
setPrefixes
public void setPrefixes(org.xml.sax.helpers.NamespaceSupport nsSupport) throws javax.xml.transform.TransformerException
- From the SAX2 helper class, set the namespace table for
this element. Take care to call resolveInheritedNamespaceDecls.
after all namespace declarations have been added.
setPrefixes
public void setPrefixes(org.xml.sax.helpers.NamespaceSupport nsSupport, boolean excludeXSLDecl) throws javax.xml.transform.TransformerException
- Copy the namespace declarations from the NamespaceSupport object.
Take care to call resolveInheritedNamespaceDecls.
after all namespace declarations have been added.
getNamespaceForPrefix
public java.lang.String getNamespaceForPrefix(java.lang.String prefix, org.w3c.dom.Node context)
- Fullfill the PrefixResolver interface. Calling this for this class
will throw an error.
- Specified by:
getNamespaceForPrefixin interfaceorg.apache.xml.utils.PrefixResolver
getNamespaceForPrefix
public 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. That makes life difficult for
the compilation experiment, which doesn't have a static vector of
local declarations. Replaced a recursive solution, which permits
easier subclassing/overriding.
- Specified by:
getNamespaceForPrefixin interfaceorg.apache.xml.utils.PrefixResolver
getPrefixes
public java.util.Vector getPrefixes()
- Return a table that contains all prefixes available
within this element context.
containsExcludeResultPrefix
public 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. This method is overridden
by
ElemLiteralResult.containsExcludeResultPrefix(java.lang.String, java.lang.String)55 .
excludeResultNSDecl
private boolean excludeResultNSDecl(java.lang.String prefix, java.lang.String uri) throws javax.xml.transform.TransformerException
- Tell if the result namespace decl should be excluded. Should be called before
namespace aliasing (I think).
resolvePrefixTables
public void resolvePrefixTables()
throws javax.xml.transform.TransformerException
- 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.
(Recursive method, walking the elements depth-first,
processing parents before children).
Note that this method builds m_prefixTable with aliased
namespaces, *not* the original namespaces.
addOrReplaceDecls
void addOrReplaceDecls(XMLNSDecl newDecl)
- Add or replace this namespace declaration in list
of namespaces in scope for this element.
needToCheckExclude
boolean needToCheckExclude()
- Return whether we need to check namespace prefixes
against and exclude result prefixes list.
executeNSDecls
void executeNSDecls(org.apache.xalan.transformer.TransformerImpl transformer) throws javax.xml.transform.TransformerException
- Send startPrefixMapping events to the result tree handler
for all declared prefix mappings in the stylesheet.
executeNSDecls
void executeNSDecls(org.apache.xalan.transformer.TransformerImpl transformer, java.lang.String ignorePrefix) throws javax.xml.transform.TransformerException
- Send startPrefixMapping events to the result tree handler
for all declared prefix mappings in the stylesheet.
unexecuteNSDecls
void unexecuteNSDecls(org.apache.xalan.transformer.TransformerImpl transformer) throws javax.xml.transform.TransformerException
- Send endPrefixMapping events to the result tree handler
for all declared prefix mappings in the stylesheet.
unexecuteNSDecls
void unexecuteNSDecls(org.apache.xalan.transformer.TransformerImpl transformer, java.lang.String ignorePrefix) throws javax.xml.transform.TransformerException
- Send endPrefixMapping events to the result tree handler
for all declared prefix mappings in the stylesheet.
setUid
public void setUid(int i)
- Set the UID (document order index).
getUid
public int getUid()
- Get the UID (document order index).
getParentNode
public org.w3c.dom.Node getParentNode()
- Get the parent as a Node.
- Specified by:
getParentNodein interfaceorg.w3c.dom.Node
getParentElem
public ElemTemplateElement getParentElem()
- Get the parent as an ElemTemplateElement.
setParentElem
public void setParentElem(ElemTemplateElement p)
- Set the parent as an ElemTemplateElement.
getNextSibling
public org.w3c.dom.Node getNextSibling()
- Get the next sibling (as a Node) or return null.
- Specified by:
getNextSiblingin interfaceorg.w3c.dom.Node
getPreviousSibling
public org.w3c.dom.Node getPreviousSibling()
- Get the previous sibling (as a Node) or return null.
Note that this may be expensive if the parent has many kids;
we accept that price in exchange for avoiding the prev pointer
TODO: If we were sure parents and sibs are always ElemTemplateElements,
we could hit the fields directly rather than thru accessors.
- Specified by:
getPreviousSiblingin interfaceorg.w3c.dom.Node
getPreviousSiblingElem
public ElemTemplateElement getPreviousSiblingElem()
- Get the previous sibling (as a Node) or return null.
Note that this may be expensive if the parent has many kids;
we accept that price in exchange for avoiding the prev pointer
TODO: If we were sure parents and sibs are always ElemTemplateElements,
we could hit the fields directly rather than thru accessors.
getNextSiblingElem
public ElemTemplateElement getNextSiblingElem()
- Get the next sibling (as a ElemTemplateElement) or return null.
getParentNodeElem
public ElemTemplateElement getParentNodeElem()
- Get the parent element.
getFirstChild
public org.w3c.dom.Node getFirstChild()
- Get the first child as a Node.
- Specified by:
getFirstChildin interfaceorg.w3c.dom.Node
getFirstChildElem
public ElemTemplateElement getFirstChildElem()
- Get the first child as a ElemTemplateElement.
getLastChild
public org.w3c.dom.Node getLastChild()
- Get the last child.
- Specified by:
getLastChildin interfaceorg.w3c.dom.Node
getLastChildElem
public ElemTemplateElement getLastChildElem()
- Get the last child.
getDOMBackPointer
public org.w3c.dom.Node getDOMBackPointer()
- If this stylesheet was created from a DOM, get the
DOM backpointer that this element originated from.
For tooling use.
setDOMBackPointer
public void setDOMBackPointer(org.w3c.dom.Node n)
- If this stylesheet was created from a DOM, set the
DOM backpointer that this element originated from.
For tooling use.
compareTo
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
- Compares this object with the specified object for precedence order.
The order is determined by the getImportCountComposed() of the containing
composed stylesheet and the getUid() of this element.
Returns a negative integer, zero, or a positive integer as this
object is less than, equal to, or greater than the specified object.
shouldStripWhiteSpace
public boolean shouldStripWhiteSpace(org.apache.xpath.XPathContext support, org.w3c.dom.Element targetElement) throws javax.xml.transform.TransformerException
- Get information about whether or not an element should strip whitespace.
- Specified by:
shouldStripWhiteSpacein interfaceorg.apache.xpath.WhitespaceStrippingElementMatcher
canStripWhiteSpace
public boolean canStripWhiteSpace()
- Get information about whether or not whitespace can be stripped.
- Specified by:
canStripWhiteSpacein interfaceorg.apache.xpath.WhitespaceStrippingElementMatcher
canAcceptVariables
public boolean canAcceptVariables()
- Tell if this element can accept variable declarations.
exprSetParent
public void exprSetParent(org.apache.xpath.ExpressionNode n)
- Set the parent of this node.
- Specified by:
exprSetParentin interfaceorg.apache.xpath.ExpressionNode
exprGetParent
public org.apache.xpath.ExpressionNode exprGetParent()
- Get the ExpressionNode parent of this node.
- Specified by:
exprGetParentin interfaceorg.apache.xpath.ExpressionNode
exprAddChild
public void exprAddChild(org.apache.xpath.ExpressionNode n, int i)
- This method tells the node to add its argument to the node's
list of children.
- Specified by:
exprAddChildin interfaceorg.apache.xpath.ExpressionNode
exprGetChild
public org.apache.xpath.ExpressionNode exprGetChild(int i)
- This method returns a child node. The children are numbered
from zero, left to right.
- Specified by:
exprGetChildin interfaceorg.apache.xpath.ExpressionNode
exprGetNumChildren
public int exprGetNumChildren()
- Return the number of children the node has.
- Specified by:
exprGetNumChildrenin interfaceorg.apache.xpath.ExpressionNode
accept
protected boolean accept(XSLTVisitor visitor)
- Accept a visitor and call the appropriate method
for this class.
callVisitors
public void callVisitors(XSLTVisitor visitor)
- Description copied from interface:
XSLTVisitable - This will traverse the heararchy, calling the visitor for
each member. If the called visitor method returns
false, the subtree should not be called.
- Specified by:
callVisitorsin interfaceXSLTVisitable
callChildVisitors
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttributes)
- Call the children visitors.
callChildVisitors
protected void callChildVisitors(XSLTVisitor visitor)
- Call the children visitors.
handlesNullPrefixes
public boolean handlesNullPrefixes()
- Specified by:
handlesNullPrefixesin interfaceorg.apache.xml.utils.PrefixResolver
|
|||||||||
| Home >> All >> org >> apache >> xalan >> [ templates overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC