If I have understood your requirement correctly, try...
<xsl:template match="ITEM[not(TYPE)]"> do something </xsl:template>
or, equivalently...
<xsl:template match="ITEM[count(TYPE) = 0]"> do something </xsl:template>
-Brandon :)
On Fri, Jul 1, 2011 at 12:44 AM, Senthilukvelaan
<skumaravelan@xxxxxxxxxxxxxx> wrote:
> Hi All,
> I have a question in conditional match template. I want to call a
> template like below when there is no child node called "TYPE" does not
> exists condition also.
> Please help me how do I do that? " TYPE " node is dynamic element in
> the input xml. It might exist or not.
>
> I have both templates in my xslt.
> <xsl:template match="ITEM[TYPE='ONLINE']">
> do something
> </xsl:template>
>
> <xsl:template match="ITEM">
> do another think
> </xsl:template>
>
>
> Please help.
>
> Thanks
> Senthil
|