[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: not() function not working

Subject: RE: not() function not working
From: "Kartheek Hirode" <khirode@xxxxxxxx>
Date: Mon, 6 Aug 2001 17:20:12 -0700
hirode
I changed the script a little bit and achieved the desired result. I think I
had quite a few things wrong the first time around.

<xsl:template match="/">
  <xsl:apply-templates select="*"/>
</xsl:template>

<xsl:template match="parent">
  <xsl:value-of select="child1[not(@type='one')]"/>
</xsl:template>

Thanks,
--KH


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Kartheek
Hirode
Sent: Monday, August 06, 2001 4:59 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.