xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Selecting child elements bar one


Subject: Re: [xsl] Selecting child elements bar one
From: Kamal Bhatt <kbhatt@xxxxxxxxx>
Date: Mon, 13 Feb 2006 10:39:32 +1100

Sebastian Tennant wrote:

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>


Works fine if you specify the tempate match as:

<xsl:template match="/doc">

BTW, what is the difference between the two suggestions given in the FAQ? They look the same to me.

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


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor