|
Subject: Re: [xsl] not() function not working From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 7 Aug 2001 10:14:32 +0200 (MET DST) |
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@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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] not() function not worki, Michael Kay | Thread | [xsl] Four quick questions about Xa, Joel Beach |
| RE: [xsl] using document() to acces, Jarno . Elovirta | Date | RE: [xsl] suprised by <xsl:copy-of , Michael Kay |
| Month |