This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: not() function not working
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] not() function not working
- From: Oliver Becker <obecker at informatik dot hu-berlin dot de>
- Date: Tue, 7 Aug 2001 10:14:32 +0200 (MET DST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
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="." />
</xsl:if>
</xsl:template>
Cheers,
Oliver
/-------------------------------------------------------------------\
| ob|do Dipl.Inf. Oliver Becker |
| --+-- E-Mail: obecker@informatik.hu-berlin.de |
| op|qo WWW: http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list