This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Selecting stylesheet at runtime?
- To: <xsl-list at mulberrytech dot com>
- Subject: Selecting stylesheet at runtime?
- From: "Martin Rothschink, AxoNet Software" <Martin dot Rothschink at axonet dot de>
- Date: Thu, 3 Feb 2000 11:37:45 +0100
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I need to select the stylesheet at runtime, depending on my XML data.
I tried to use something like
<xsl:template match="/">
<xsl:apply-templates select="/RESULTS/RESULT" mode="switch"/>
</xsl:template>
<xsl:template match="RESULT" mode="switch">
<xsl:choose>
<xsl:when test="@OBJECT='EMISSION' and @METHOD != 'SMOKE'">
<xsl:include href="gas.xsl"/>
</xsl:when>
<xsl:when test="@OBJECT='EMISSION' and @METHOD = 'SMOKE'">
<xsl:include href="smoke.xsl"/>
</xsl:when>
<xsl:otherwise>
<xsl:include href="generic.xsl"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
But the xsl:include doesn't work.
Regards
Martin Rothschink
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list