Use the XSLT elements below to define templates that specify how to process selected input elements.
This is the basic tag specifying how to process some set of input. There are two basic types of templates:
Templates with a match="..." attribute are
applied to the input nodes that are selected by
that attribute.
Templates with a name="..." attribute are
called named templates. They
are invoked by explicitly calling them with the
<xsl:apply-templates>
element.
You must supply either a
match attribute or a
name attribute.
Attributes of <xsl:template>:
matchAn XPath expression that selects a set of nodes.
For example,
match="trail" specifies a
template that matches all
<trail> elements.
nameInstead of a match
attribute, you can give your template a name and
call it using
<xsl:call-template>.
For example, if you have a template that looks like
<xsl:template name="add-links">
then you could call this template using
<xsl:call-template name="add-links"/>
You can also pass values to a named template using
<xsl:with-param>.
modeSometimes you want to use the same content in more than one place. For example, chapter titles might appear both at the beginning of a chapter and also in the table of contents.
To do this, define a mode="
attribute on the template for each place you use
that content. Then use m"<xsl:apply-templates
mode=" to
process the content with that mode.m"...>