Conditional selection of Templates in XSL

Subject: Conditional selection of Templates in XSL
From: "ciaran byrne" <ciaran.byrne@xxxxxxx>
Date: Thu, 24 Aug 2000 16:29:35 -0700
Hi all,
	I'm attempting to select certain templates in my XSL
according to whether I've set a param to true or false.
Allow me to explain as follows:
In HTML tables can be nested. In my XML they can't.
So, I have a param set in my XSL that I pass a value into
using MSXML. If this value is set to 'true' then I want to
just extract the text from the table i.e. TABLE/text()
if it's false then I want to output the table and all the child
nodes that go with it.
Here is the type of XSL I'm attempting:

<xsl:template match="TABLE">
		<xsl:when test="$isFile = 'true'">
			<xsl:call-template name="extractTable"/>
			<!-- Here I want to output the Table with all
				it's child nodes such as <tr>,<td> etc. -->

<!-- Does this mean that when called I only match against
the text node ????? -->
<xsl:template name="extractTable" match="TABLE/text()">
	<xsl:value-of select="."/>

I know this is wrong...but I was hoping it would give an idea of where
I'm going.

 XSL-List info and archive:

Current Thread