<xsl:template match="name" mode="verbose">
...display the full name
</xsl:template>
<xsl:template match="name" mode="abbreviated">
...omit the middle name
</xsl:template>
In order to instantiate the appropriate template, a
mode attribute must be added to
<xsl:apply-templates> as follows:
<xsl:apply-templates select="president/name" mode="verbose"/>
If the mode attribute is omitted, then the
processor searches for a matching template that does not have a mode.
In the code shown here, both templates have modes, so you must
include a mode on <xsl:apply-templates> in
order for one of your templates to be instantiated.