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:choose> <xsl:when test="$isFile = 'true'"> <xsl:call-template name="extractTable"/> </xsl:when> <xsl:otherwise> <!-- Here I want to output the Table with all it's child nodes such as <tr>,<td> etc. --> </xsl:otherwise> </xsl:choose> <xsl:apply-templates/> </xsl:template> <!-- Does this mean that when called I only match against the text node ????? --> <xsl:template name="extractTable" match="TABLE/text()"> <xsl:value-of select="."/> </xsl:template> I know this is wrong...but I was hoping it would give an idea of where I'm going. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Conditional selection of Templa, ciaran byrne | Thread | RE: Conditional selection of Templa, Chris Bayes |
Re: XML Parser for Macs, Steve Ball | Date | Re: How to embed xsl:value-of into , rugowski |
Month |