[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Applying templates to all but descendant-or-self::

Subject: Re: Applying templates to all but descendant-or-self::
From: "Jagdishwar B" <jagdishwar.beemanati@xxxxxxxxx>
Date: Fri, 16 Jun 2006 09:12:14 +0200
not descendant xml

I'm still rather confused by the reason that <xsl:apply-templates select="*[not(descendant-or-self::sectionnumber or descendant-or-self::sectiontext)]"/> would not match the <change> element. I wonder if you could shed any light on this?

in your case, the <xsl:apply-templates select="*[not(descendant-or-self::sectionnumber or descendant-or-self::sectiontext)]"/> will not match <change> element because, when <change> is the context node, it satisfies the predicate (descendant-or-self::sectionnumber or descendant-or-self::sectiontext) as <change> itself has sectionnumber and sectiontext as descendents. and, not(descendant-or-self::sectionnumber or descendant-or-self::sectiontext) is giving false when <change> is the context node, so it is not getting matched.

i think you can achieve what you are looking for, by using
<xsl:apply-templates select="*[not(self::sectionnumber or self::sectiontext)]"/>
it will match all the children of <section> exept sectionnumber and sectiontext.

Kind Regards,

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.