Hi Ben,
I do not think it is possible to do what you are trying.
I usualy only do tests on attributes or node values in the context,
but perhaps something like this will work for you?
<xsl:variable name="Layout" select="/content/layout/node()"/>
<xsl:template match="SomeTemplate">
<xsl:apply-templates select="xxx"/>
</xsl:template>
<xsl:template match="xxx[$Layout='OneLayout']">
<!-- Do something with this one -->
</xsl:template>
<xsl:template match="xxx[$Layout='AnotherLayout']">
<!-- Do something with this other one -->
</xsl:template>
Regards,
Ragulf Pickaxe :-)
On 11/3/05, ben senior <ben(_at_)autonomic(_dot_)net> wrote:
I wish to decide between calling one of a set of templates depending on
a fragment of xml (/content/layout/node()).
Rather than having a mass of xsl:when/choose statements, I thought I
would add :
<xsl:apply-templates select="xxx" mode="{/content/layout/node()}"/>
--~------------------------------------------------------------------
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>
--~--