|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.apache.xalan.xslt.UnImplNode | +--weblogic.apache.xalan.xslt.ElemTemplateElement
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.
This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.
Stylesheet
, Serialized FormField Summary | |
int |
m_columnNumber
The columnOffset where the element occurs in the xsl file. |
boolean |
m_defaultSpace
Tell if this element has the default space handling turned off or on according to the xml:space attribute. |
java.lang.String |
m_elemName
The name of the element. |
protected StringToStringTable |
m_excludedNamespaces
The table of namespaces that are excluded from being used in the result tree but which need to be used in to resolve prefixes. |
boolean |
m_finishedConstruction
Tell if we've finished construction. |
protected ElemTemplateElement |
m_firstChild
First child. |
int |
m_lineNumber
The line number where the element occurs in the xsl file. |
protected StringToStringTable |
m_namespaces
The table of namespaces that can be used in the result tree. |
ElemTemplateElement |
m_parentNode
Parent node. |
Stylesheet |
m_stylesheet
The owning stylesheet. |
Constructor Summary | |
ElemTemplateElement(XSLTEngineImpl processor,
Stylesheet stylesheetTree,
java.lang.String name,
org.xml.sax.AttributeList atts,
int lineNumber,
int columnNumber)
Construct a template element instance. |
Method Summary | |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild)
Add a child to the child list. |
java.lang.String |
childrenToString(XSLTEngineImpl processor,
org.w3c.dom.Node sourceTree,
org.w3c.dom.Node sourceNode,
QName mode)
Take the contents of a template element, process it, and convert it to a string. |
void |
error(int msg,
java.lang.Object[] args)
Throw a template element runtime error. |
void |
execute(XSLTEngineImpl processor,
org.w3c.dom.Node sourceTree,
org.w3c.dom.Node sourceNode,
QName mode)
Execute the element's primary function. |
void |
executeChildren(XSLTEngineImpl processor,
org.w3c.dom.Node sourceTree,
org.w3c.dom.Node sourceNode,
QName mode)
Process the children of a template. |
java.lang.String |
getBaseIdentifier()
Return the base identifier. |
org.w3c.dom.NodeList |
getChildNodes()
Return the nodelist (same reference). |
org.w3c.dom.Node |
getFirstChild()
Get the first child |
org.w3c.dom.Node |
getLastChild()
Get the last child. |
int |
getLength()
NodeList method: Count the immediate children of this node |
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)
Given a namespace, get the corrisponding prefix. |
org.w3c.dom.Node |
getNextSibling()
Get the next sibling 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. |
org.w3c.dom.Node |
getParentNode()
Get the parent. |
java.lang.String |
getTagName()
Return the element name. |
int |
getXSLToken()
Get an integer representation of the element type. |
boolean |
hasChildNodes()
Tell if there are child nodes. |
static boolean |
isSpace(char ch)
Returns whether the specified ch conforms to the XML 1.0 definition of whitespace. |
boolean |
isWhiteSpace(java.lang.String string)
Tell if the string is whitespace. |
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 |
processLocatedNode(XPathSupport execContext,
org.w3c.dom.Node sourceNode,
java.lang.Object callbackInfo)
Implementation of NodeCallback interface. |
protected StringToStringTable |
processPrefixControl(java.lang.String localName,
java.lang.String attrValue,
StringToStringTable excludeResultPrefixes)
Process the exclude-result-prefixes or the extension-element-prefixes attributes, for the purpose of prefix exclusion. |
protected boolean |
shouldExcludeResultNamespaceNode(ElemTemplateElement elem,
java.lang.String prefix,
java.lang.String uri)
Tell if the result namespace decl should be excluded. |
protected void |
transformSelectedChildren(Stylesheet stylesheetTree,
ElemTemplateElement xslInstruction,
ElemTemplateElement template,
org.w3c.dom.Node sourceTree,
org.w3c.dom.Node sourceNodeContext,
QName mode,
XPath selectPattern,
int xslToken,
XSLTEngineImpl tcontext,
int selectStackFrameIndex)
Perform a query if needed, and call transformChild for each child. |
Methods inherited from class weblogic.apache.xalan.xslt.UnImplNode |
cloneNode,
getAttribute,
getAttributeNode,
getAttributeNodeNS,
getAttributeNS,
getAttributes,
getElementsByTagName,
getElementsByTagNameNS,
getLocalName,
getNamespaceURI,
getNodeValue,
getPrefix,
getPreviousSibling,
hasAttribute,
hasAttributeNS,
hasAttributes,
insertBefore,
normalize,
removeAttribute,
removeAttributeNode,
removeAttributeNS,
removeChild,
replaceChild,
setAttribute,
setAttributeNode,
setAttributeNodeNS,
setAttributeNS,
setNodeValue,
setPrefix,
supports |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public Stylesheet m_stylesheet
public int m_lineNumber
public int m_columnNumber
public boolean m_defaultSpace
protected StringToStringTable m_namespaces
protected StringToStringTable m_excludedNamespaces
public boolean m_finishedConstruction
public java.lang.String m_elemName
public ElemTemplateElement m_parentNode
protected ElemTemplateElement m_firstChild
Constructor Detail |
public ElemTemplateElement(XSLTEngineImpl processor, Stylesheet stylesheetTree, java.lang.String name, org.xml.sax.AttributeList atts, int lineNumber, int columnNumber) throws org.xml.sax.SAXException
processor
- The XSLT Processor.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 java.lang.String getNamespaceForPrefix(java.lang.String prefix, org.w3c.dom.Node context)
public java.lang.String getNamespaceForPrefix(java.lang.String prefix)
protected StringToStringTable processPrefixControl(java.lang.String localName, java.lang.String attrValue, StringToStringTable excludeResultPrefixes) throws org.xml.sax.SAXException
protected boolean shouldExcludeResultNamespaceNode(ElemTemplateElement elem, java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
exclude-result-prefixes
or xsl:exclude-result-prefixes
attribute; a subtree rooted at an xsl:stylesheet
element
does not include any stylesheets imported or included by children
of that xsl:stylesheet
element."
public void execute(XSLTEngineImpl processor, org.w3c.dom.Node sourceTree, org.w3c.dom.Node sourceNode, QName mode) throws XSLProcessorException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException, org.xml.sax.SAXException
processor
- The XSLT Processor.sourceTree
- The input source tree.sourceNode
- The current context node.mode
- The current mode.public void executeChildren(XSLTEngineImpl processor, org.w3c.dom.Node sourceTree, org.w3c.dom.Node sourceNode, QName mode) throws XSLProcessorException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException, org.xml.sax.SAXException
processor
- The XSLT processor instance.sourceTree
- The input source tree.sourceNode
- The current context node.mode
- The current mode.public java.lang.String childrenToString(XSLTEngineImpl processor, org.w3c.dom.Node sourceTree, org.w3c.dom.Node sourceNode, QName mode) throws XSLProcessorException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException, org.xml.sax.SAXException
processor
- The XSLT processor instance.sourceTree
- The primary source tree.sourceNode
- The current source node context.mode
- The current mode.public int getXSLToken()
Constants.java
protected void transformSelectedChildren(Stylesheet stylesheetTree, ElemTemplateElement xslInstruction, ElemTemplateElement template, org.w3c.dom.Node sourceTree, org.w3c.dom.Node sourceNodeContext, QName mode, XPath selectPattern, int xslToken, XSLTEngineImpl tcontext, int selectStackFrameIndex) throws XSLProcessorException, java.net.MalformedURLException, java.io.FileNotFoundException, java.io.IOException, org.xml.sax.SAXException
stylesheetTree
- The owning stylesheet tree.xslInstruction
- The stylesheet element context (depricated -- I do
not think we need this).template
- The owning template context.sourceTree
- The input source tree.sourceNodeContext
- The current source node context.mode
- The current mode.selectPattern
- The XPath with which to perform the selection.xslToken
- The current XSLT instruction (depricated -- I do not
think we want this).tcontext
- The XSLTEngineImpl context.selectStackFrameIndex
- The stack frame context for executing the
select statement.public static boolean isSpace(char ch)
S
for details.
ch
- Character to check as XML whitespace.public boolean isWhiteSpace(java.lang.String string)
string
- The string in question.public void processLocatedNode(XPathSupport execContext, org.w3c.dom.Node sourceNode, java.lang.Object callbackInfo) throws org.xml.sax.SAXException
execContext
- Execution context.sourceNode
- The source node that was located.callbackInfo
- Opaque info for the caller's benefit.public void error(int msg, java.lang.Object[] args)
msg
- Description of the error that occured.public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException
newChild
- public boolean hasChildNodes()
public short getNodeType()
public org.w3c.dom.Node getParentNode()
public org.w3c.dom.NodeList getChildNodes()
public org.w3c.dom.Node getFirstChild()
public org.w3c.dom.Node getLastChild()
public org.w3c.dom.Node getNextSibling()
public int getLength()
public org.w3c.dom.Node item(int index)
index
- public org.w3c.dom.Document getOwnerDocument()
public java.lang.String getTagName()
public java.lang.String getNodeName()
public java.lang.String getBaseIdentifier()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |