xsl:call-template Element
Invokes a template by name.
<xsl:call-template
name = QName>
</xsl:call-template>
Attributes
- name
[required] Name of the template to be invoked.
Element Information
Number of occurrences | Unlimited |
Parent elements | xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:param, xsl:processing-instruction, xsl:template, xsl:variable, xsl:when, xsl:with-param, output elements |
Child elements | xsl:with-param, output elements |
Remarks
The <xsl:call-template> enables you to invoke a named template — an <xsl:template> element — with an assigned name attribute. If an <xsl:template> element has a name attribute, it may, but need not, also have a match attribute. An <xsl:call-template> element invokes a template by name; it has a required name attribute that identifies the template to be invoked. Unlike <xsl:apply-templates>, <xsl:call-template> does not change the current node or the current node-list.
An error occurs if a style sheet contains more than one template with the same name.
An <xsl:call-template> element can contain any number of <xsl:with-param> elements. However, it cannot contain other XSLT elements.
See Also
XSLT Elements | xsl:template Element
Last updated on Saturday, April 10, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.