RE: [xsl] not() function not working

Subject: RE: [xsl] not() function not working
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Tue, 7 Aug 2001 10:32:32 +0100
The output of your stylesheet contains all the text nodes of the original
XML source, in order. The most common reason for this is that you are trying
to process an XSLT stylesheet using Microsoft's WD-xsl processor (MSXML2,
which comes with IE5). If you are unfamiliar with the distinction, see the
MSXML FAQ at www.netcrucible.com.

Mike Kay
Software AG

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Kartheek
> Hirode
> Sent: 07 August 2001 00:59
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] not() function not working
>
>
> Hello,
> I'm trying to selectively pick nodes using the not()
> function. I seem to be
> missing something because the output does not reflect the
> not() exclusion. I
> appreciate your attention.
>
> XSL script is:
> <xsl:template match="/">
> 	<xsl:apply-templates select="*"/>
> </xsl:template>
>
> <xsl:template match="child1[not(@type='one')]">
> 	<xsl:value-of select="."/>
> </xsl:template>
>
>
> XML data is:
> <parent>
>   <child1 type='one'>
>      <child2 name = 'a'>
>         <valueOf>aaa</valueOf>
>      </child2>
>      <child2 name = 'b'>
>         <valueOf>bbb</valueOf>
>      </child2>
>   </child1>
>   <child1 type='two'>
>      <child2 name = 'c'>
> 	  <valueOf>ccc</valueOf>
> 	  <valueOf>ddd</valueOf>
>      </child2>
>   </child1>
> </parent>
>
> The output is:
>   aaa
>   bbb
>
>   ccc
>   ddd
>
>
> Whereas, I am trying to get this output:
>   ccc
>   ddd
>
> Much appreciated,
> --KH
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread