The <xsl:template> element defines an output producing template. This element must have either the match attribute or the name attribute set.
The <xsl:template> element defines an output producing template. This element must have either the match attribute or the name attribute set.
<xsl:template match=PATTERN name=NAME mode=NAME priority=NUMBER> <xsl:param> [optional] TEMPLATE </xsl:template>
None.
matchSpecifies a pattern that determines the elements for which this template should be used. It is a required attribute if there is no name attribute.
nameSpecifies a name for this template, by which it can be invoked through the <xsl:call-template> element.
modeSpecifies a particular mode for this template, which can be matched by an attribute of the <xsl:apply-templates> element. This is useful for processing the same information in multiple ways.
prioritySpecifies a numeric priority for this template. This can be any number other than Infinity. The processor uses this number when more than one template matches the same node.
Top-level, must be the child of <xsl:stylesheet> or <xsl:transform>.
XSLT, section 5.3.
Supported.
© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/template