Does something as mundane as this work:
<xsl:choose>
<xsl:when test="$variable = 'foo'">
<xsl:apply-templates mode="foo"/>
</xsl:when>
<xsl:when test="$variable = 'bar'">
<xsl:apply-templates mode="bar"/>
</xsl:when>
<!-- etc. -->
<xsl:otherwise>
<xsl:message>Invalid variable: <xsl:value-of select="$variable"/>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
That would work, but there are several dozen options, and it would get
tedious. I ended up abandoning modes and matching the templates to
the attribute of the element.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--