![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Test Ancestor axis for not contain any elements except defined >Thread Next - Re: Test Ancestor axis for not contain any elements except defined Re: Test Ancestor axis for not contain any elements except definedTo: NULL Date: 8/15/2006 3:42:00 PM centur@g... wrote: > Yes, there are more levels of LovelyTags , and they can be follow in > random order and have no fixed length, i.e. all this paths should be > valid > > /MyRoot/LovelyTag1/LovelyTag2/Item > /MyRoot/LovelyTag1/LovelyTag2/LovelyTag2/LovelyTag1/Item > /MyRoot/LovelyTag2/LovelyTag1/LovelyTag2/LovelyTag1/LovelyTag2/Item Checking e.g. <xsl:if test="ancestor::*[not(self::MyRoot) and not(self::LovelyTag1) and not(self::LovelyTag2)]"> should tell you that there are ancestor elements which are not MyRoot/LovelyTag1/LovelyTag2 elements respectively the XPath expression //Item[not(ancestor::*[not(self::MyRoot) and not(self::LovelyTag1) and not(self::LovelyTag2)])] should give you all Item elements you are looking for. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
