Subject: [xsl] call-templates From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx> Date: Thu, 07 Feb 2002 12:50:59 +0000 |
Testing my solution on IE. 6.0 I get the following error: Keyword xsl:call-templates may not be used here.
Sincerly Ragulf Pickaxe :)
<root> <DataList> <Data Type="101"><Node1>Value1</Node1><Node2></Node2></Data> <Data Type="102"><Node1>Value1</Node1><Node2>Value2</Node2></Data> <Data Type="103"><Node1>Value1</Node1><Node2></Node2></Data> <Data Type="201"><Node1>Value1</Node1><Node2>Value3</Node2></Data> <Data Type="202"><Node1>Value1</Node1><Node2>Value3</Node2></Data> </DataList> </root>
<xsl:template match="DataList"> <xsl:choose> <xsl:when test="@Type='101' or @Type='102' or @Type='103'"> <!-- Not having implemented the solution to my last question. --> <xsl:call-templates name="Do-Something"/> </xsl:when> <xsl:when test="@Type='201' or @Type='202' or @Type='203'"> <xsl:call-templates name="Do-Something-Else"/> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:template>
<xsl:template name="Do-Something"> <This><xsl:value-of select="Node1"/></This> <xsl:if test="Type='102'"> <That><xsl:value-of select="Node2"/></That> </xsl:if> </xsl:template>
<xsl:template name="Do-Something-Else"> <This><xsl:value-of select="Node1"/></This> <AnotherThat><xsl:value-of select="Node2"/></AnotherThat> </xsl:template>
_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:key problem (probably, Joerg Heinicke | Thread | RE: [xsl] call-templates, Julian Reschke |
Re: [xsl] xsl:key problem (probably, Joerg Heinicke | Date | RE: [xsl] tag minimisation, Andrew Welch |
Month |