[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Catch ALL | Failed template rule
Hi Stef,
At 03:20 PM 3/22/2005, you wrote: Jumping in at the eleventh hour and probably am hugely wrong here, but, wouldn't the following work ? No, this matches an element (*) that does not have a foo child with a bar child with @a='b'. What you are trying to express would probably be *[not(self::bar[parent::foo][@a='b'] which would match any element not itself a bar with a foo parent and an @a='b'. This would match any node that did not have the foo/bar entity with an attribute of a that was b. you would (of course) need to provide some other search criteria such as name()="corefoo" so that it didn't match elements you were not interested in. Yes, exactly. As a sidenote, I have used the following in my xslt to match any sub-element that was -not- a prev, next or alternativenames Yes, an XPath junkie would probably prefer *[not(self::prev|self::next|self::alternativenames)] which will select any child element not itself a prev, next or alternativesnames. We generally like to leave name testing for the Perl hackers. :-> Cheers, Wendell again, apologies if this is not what was asked for, I am simply trying to offer something that has worked for me in a somewhat similiar fashion. Not a problem. The bottom line is, don't think about matching without thinking about selecting. Match is only the Yin to the select's Yang. Cheers, Wendell
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|