watchout for your context node. in your case , The template is matching "/"
and so apply-templates select = "*" is going to apply templates to the only
child :: "doc".
What you need is to match the doc template and do what you did.
Vasu
From: Sebastian Tennant <sebyte(_at_)smolny(_dot_)plus(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Selecting child elements bar one
Date: Sun, 12 Feb 2006 23:27:50 +0000
Hi all,
According to:
http://www.dpawson.co.uk/xsl/sect2/N6191.html#d8248e349
this is supposed to work:
<xsl:template match="/">
<xsl:apply-templates select="*[not(self::two)]" />
</xsl:template>
i.e., given this XML input:
<doc>
<one>foo</one>
<two>bar</two>
<three>baz</three>
</doc>
element 'two' should be excluded.
Well, I'm getting:
foo
bar
baz
and it's starting to drive me crazy. What's worse, is that I know the
answer is going to be so damn obvious I'm going to feel incredibly
stupid, more so than I do already. Aaaarrrggghhh, I think XSLT hates
me!
sdt
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
_________________________________________________________________
The new MSN Search Toolbar now includes Desktop search!
http://toolbar.msn.co.uk/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--