Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.xml.utils.UnImplNode
org.apache.xalan.templates.ElemTemplateElement
org.apache.xalan.templates.ElemTemplate
public class ElemTemplate
extends ElemTemplateElement
<!ELEMENT xsl:template (#PCDATA %instructions; %result-elements; | xsl:param) > <!ATTLIST xsl:template match %pattern; #IMPLIED name %qname; #IMPLIED priority %priority; #IMPLIED mode %qname; #IMPLIED %space-att; >
section-Defining-Template-Rules in XSLT Specification
Nested Class Summary |
Field Summary | |
int |
|
Fields inherited from interface org.w3c.dom.Node | |
ATTRIBUTE_NODE , CDATA_SECTION_NODE , COMMENT_NODE , DOCUMENT_FRAGMENT_NODE , DOCUMENT_NODE , DOCUMENT_TYPE_NODE , ELEMENT_NODE , ENTITY_NODE , ENTITY_REFERENCE_NODE , NOTATION_NODE , PROCESSING_INSTRUCTION_NODE , TEXT_NODE |
Method Summary | |
void |
|
void |
|
void |
|
XPath |
|
QName |
|
QName |
|
String |
|
double |
|
String |
|
Stylesheet |
|
StylesheetComposed |
|
StylesheetRoot |
|
String |
|
int |
|
void |
|
void |
|
void | |
void | |
void | |
void |
|
void |
|
public int m_frameSize
The stack frame size for this template, which is equal to the maximum number of params and variables that can be declared in the template at one time.
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 ElemTemplateElement
public void endCompose(StylesheetRoot sroot) throws TransformerException
This after the template's children have been composed.
- Overrides:
- endCompose in interface ElemTemplateElement
public void execute(TransformerImpl transformer) throws TransformerException
Copy the template contents into the result tree. The content of the xsl:template element is the template that is instantiated when the template rule is applied.
- Overrides:
- execute in interface ElemTemplateElement
- Parameters:
transformer
- non-null reference to the the current transform-time state.
- Throws:
TransformerException
-
public XPath getMatch()
Get the "match" attribute. The match attribute is a Pattern that identifies the source node or nodes to which the rule applies. The match attribute is required unless the xsl:template element has a name attribute (see [6 Named Templates]). It is an error for the value of the match attribute to contain a VariableReference.
- Returns:
- Value of the "match" attribute
- See Also:
patterns in XSLT Specification
public QName getMode()
Get the "mode" attribute. Modes allow an element to be processed multiple times, each time producing a different result. If xsl:template does not have a match attribute, it must not have a mode attribute.
- Returns:
- Value of the "mode" attribute
- See Also:
modes in XSLT Specification
public QName getName()
Get the "name" attribute. An xsl:template element with a name attribute specifies a named template. If an xsl:template element has a name attribute, it may, but need not, also have a match attribute.
- Returns:
- Value of the "name" attribute
public String getNodeName()
Return the node name.
- Specified by:
- getNodeName in interface Node
- Overrides:
- getNodeName in interface ElemTemplateElement
- Returns:
- The element's name
public double getPriority()
Get the "priority" attribute. The priority of a template rule is specified by the priority attribute on the template rule. The value of this must be a real number (positive or negative), matching the production Number with an optional leading minus sign (-).
- Returns:
- The value of the "priority" attribute
- See Also:
conflict in XSLT Specification
public String getPublicId()
Return the public identifier for the current document event. This will be the public identifier
- Specified by:
- getPublicId in interface SourceLocator
- Overrides:
- getPublicId in interface ElemTemplateElement
- Returns:
- A string containing the public identifier, or null if none is available.
- See Also:
getSystemId()
public Stylesheet getStylesheet()
Get the owning stylesheet.
- Overrides:
- getStylesheet in interface ElemTemplateElement
- Returns:
- The owning stylesheet.
public StylesheetComposed getStylesheetComposed()
Get the stylesheet composed (resolves includes and imports and has methods on it that return "composed" properties.
- Overrides:
- getStylesheetComposed in interface ElemTemplateElement
- Returns:
- The stylesheet composed.
public StylesheetRoot getStylesheetRoot()
Get the root stylesheet.
- Overrides:
- getStylesheetRoot in interface ElemTemplateElement
- Returns:
- The root stylesheet for this element
public 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:
- getSystemId in interface SourceLocator
- Overrides:
- getSystemId in interface ElemTemplateElement
- Returns:
- A string containing the system identifier, or null if none is available.
- See Also:
getPublicId()
public int getXSLToken()
Get an int constant identifying the type of element.
- Overrides:
- getXSLToken in interface ElemTemplateElement
- Returns:
- The token ID for the element
- See Also:
Constants
public void recompose(StylesheetRoot root)
This function is called during recomposition to control how this element is composed.
- Overrides:
- recompose in interface ElemTemplateElement
- Parameters:
root
- The root stylesheet for this transformation.
public void setLocaterInfo(SourceLocator locator)
Set the location information for this element.
- Overrides:
- setLocaterInfo in interface ElemTemplateElement
- Parameters:
locator
- SourceLocator holding location information
public void setMatch(XPath v)
Set the "match" attribute. The match attribute is a Pattern that identifies the source node or nodes to which the rule applies. The match attribute is required unless the xsl:template element has a name attribute (see [6 Named Templates]). It is an error for the value of the match attribute to contain a VariableReference.
- Parameters:
v
- Value to set for the "match" attribute
- See Also:
patterns in XSLT Specification
public void setMode(QName v)
Set the "mode" attribute. Modes allow an element to be processed multiple times, each time producing a different result. If xsl:template does not have a match attribute, it must not have a mode attribute.
- Parameters:
v
- Value to set the "mode" attribute
- See Also:
modes in XSLT Specification
public void setName(QName v)
Set the "name" attribute. An xsl:template element with a name attribute specifies a named template. If an xsl:template element has a name attribute, it may, but need not, also have a match attribute.
- Parameters:
v
- Value to set the "name" attribute
public void setPriority(double v)
Set the "priority" attribute. The priority of a template rule is specified by the priority attribute on the template rule. The value of this must be a real number (positive or negative), matching the production Number with an optional leading minus sign (-).
- Parameters:
v
- The value to set for the "priority" attribute
- See Also:
conflict in XSLT Specification
public void setStylesheet(Stylesheet sheet)
Set the owning stylesheet.
- Parameters:
sheet
- The owning stylesheet for this element