org.apache.xalan.templates

Class ElemApplyTemplates

Implemented Interfaces:
Document, Element, ExpressionNode, ExpressionOwner, Node, NodeList, PrefixResolver, Serializable, SourceLocator, WhitespaceStrippingElementMatcher, XSLTVisitable

public class ElemApplyTemplates
extends ElemCallTemplate

Implement xsl:apply-templates.
 &!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*>
 &!ATTLIST xsl:apply-templates
   select %expr; "node()"
   mode %qname; #IMPLIED
 &
 
See Also:
section-Applying-Template-Rules in XSLT Specification

Field Summary

Fields inherited from class org.apache.xalan.templates.ElemCallTemplate

m_templateName

Fields inherited from class org.apache.xalan.templates.ElemForEach

m_doc_cache_off

Method Summary

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.
void
execute(TransformerImpl transformer)
Apply the context node to the matching templates.
QName
getMode()
Get the mode attribute for this element.
String
getNodeName()
Return the node name.
int
getXSLToken()
Get an int constant identifying the type of element.
void
setIsDefaultTemplate(boolean b)
Set if this belongs to a default template, in which case it will act different with regard to processing modes.
void
setMode(QName mode)
Set the mode attribute for this element.
void
transformSelectedNodes(TransformerImpl transformer)
Perform a query if needed, and call transformNode for each child.

Methods inherited from class org.apache.xalan.templates.ElemCallTemplate

appendChild, callChildVisitors, compose, endCompose, execute, getName, getNodeName, getParamElem, getParamElemCount, getXSLToken, setName, setParamElem

Methods inherited from class org.apache.xalan.templates.ElemForEach

appendChild, callChildVisitors, compose, endCompose, execute, getExpression, getNodeName, getSelect, getSortElem, getSortElemCount, getXSLToken, setExpression, setSelect, setSortElem, sortNodes, transformSelectedNodes

Methods inherited from class org.apache.xalan.templates.ElemTemplateElement

appendChild, appendChild, callVisitors, canAcceptVariables, canStripWhiteSpace, compareTo, compose, containsExcludeResultPrefix, endCompose, error, error, execute, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getBaseIdentifier, getChildNodes, getColumnNumber, getDOMBackPointer, getDeclaredPrefixes, getEndColumnNumber, getEndLineNumber, getFirstChild, getFirstChildElem, getLastChild, getLastChildElem, getLength, getLineNumber, getLocalName, getNamespaceForPrefix, getNamespaceForPrefix, getNextSibling, getNextSiblingElem, getNodeName, getNodeType, getOwnerDocument, getOwnerXSLTemplate, getParentElem, getParentNode, getParentNodeElem, getPrefixes, getPreviousSibling, getPreviousSiblingElem, getPublicId, getStylesheet, getStylesheetComposed, getStylesheetRoot, getSystemId, getTagName, getUid, getXSLToken, getXmlSpace, handlesNullPrefixes, hasChildNodes, hasTextLitOnly, hasVariableDecl, insertBefore, isCompiledTemplate, item, recompose, removeChild, replaceChild, replaceChild, resolvePrefixTables, runtimeInit, setDOMBackPointer, setEndLocaterInfo, setLocaterInfo, setParentElem, setPrefixes, setPrefixes, setUid, setXmlSpace, shouldStripWhiteSpace

Methods inherited from class org.apache.xml.utils.UnImplNode

adoptNode, appendChild, appendData, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, error, error, getAttribute, getAttributeNS, getAttributeNode, getAttributeNodeNS, getAttributes, getBaseURI, getChildNodes, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getEncoding, getFeature, getFirstChild, getImplementation, getInputEncoding, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getOwnerElement, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getSpecified, getStandalone, getStrictErrorChecking, getTagName, getTextContent, getUserData, getVersion, getXmlEncoding, getXmlStandalone, getXmlVersion, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, importNode, insertBefore, insertData, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, normalizeDocument, removeAttribute, removeAttributeNS, removeAttributeNode, removeChild, renameNode, replaceChild, replaceData, setAttribute, setAttributeNS, setAttributeNode, setAttributeNodeNS, setData, setDocumentURI, setEncoding, setIdAttribute, setIdAttributeNS, setIdAttributeNode, setNodeValue, setPrefix, setStandalone, setStrictErrorChecking, setTextContent, setUserData, setValue, setVersion, setXmlStandalone, setXmlVersion, splitText, substringData

Method Details

compose

public void compose(StylesheetRoot sroot)
            throws 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.
Overrides:
compose in interface ElemCallTemplate

execute

public void execute(TransformerImpl transformer)
            throws TransformerException
Apply the context node to the matching templates.
Overrides:
execute in interface ElemCallTemplate
Parameters:
transformer - non-null reference to the the current transform-time state.

getMode

public QName getMode()
Get the mode attribute for this element.
Returns:
The mode attribute for this element

getNodeName

public String getNodeName()
Return the node name.
Overrides:
getNodeName in interface ElemCallTemplate
Returns:
Element name

getXSLToken

public int getXSLToken()
Get an int constant identifying the type of element.
Overrides:
getXSLToken in interface ElemCallTemplate
Returns:
Token ID for this element types
See Also:
Constants

setIsDefaultTemplate

public void setIsDefaultTemplate(boolean b)
Set if this belongs to a default template, in which case it will act different with regard to processing modes.
Parameters:
b - boolean value to set.

setMode

public void setMode(QName mode)
Set the mode attribute for this element.
Parameters:
mode - reference, which may be null, to the current mode.

transformSelectedNodes

public void transformSelectedNodes(TransformerImpl transformer)
            throws TransformerException
Perform a query if needed, and call transformNode for each child.
Overrides:
transformSelectedNodes in interface ElemForEach
Parameters:
transformer - non-null reference to the the current transform-time state.

Copyright B) 2004 Apache XML Project. All Rights Reserved.