[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: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Aug 2001 10:14:32 +0200 (MET DST)
Re:  not() function  not working
Hi Kartheek,

though you found already a working solution, a small comment of mine 

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

This template defines what to do for child1 elements which meet
a certain condition (not(@type='one')). You don't specifiy what
to do for the other child1 elements. 
In this case the built-in templates will be used which lead 
eventually to the same output.

You might want to solve this by adding another template:

<xsl:template match="child1" priority="-1" />  <!-- do nothing -->

Or you can use xsl:if and replace your template with the following

<xsl:template match="child1">
   <xsl:if test="not(@type='one')">
      <xsl:value-of select="." />


|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |

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

Current Thread


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.
First Name
Last Name
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.