RE: [xsl] Selecting child elements bar one

Subject: RE: [xsl] Selecting child elements bar one
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Mon, 13 Feb 2006 13:14:51 +0000
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.

From: Sebastian Tennant <sebyte@xxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Selecting child elements bar one
Date: Sun, 12 Feb 2006 23:27:50 +0000

Hi all,

According to:

this is supposed to work:

  <xsl:template match="/">
    <xsl:apply-templates select="*[not(self::two)]" />

i.e., given this XML input:


element 'two' should be excluded.

Well, I'm getting:


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


The new MSN Search Toolbar now includes Desktop search!

Current Thread