![]() |
![]() | ![]() | ![]() | 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/14/2006 11:02:00 PM 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 Ok I think my first idea with replacements (and latest "evolution" to use external namespace object from C#, where more easily to detect such issues) should be used. Martin Honnen wrote: > centur@g... wrote: > > > It's a bit hard to explain question in plain English or plain code, I > > try to provide simple > > XML > > <MyRoot> > > <LovelyTag1> > > <LovelyTag2> > > <Item/> > > </LovelyTag2> > > </LovelyTag1> > > > > <LovelyTag1> > > <BadTag1> > > <LovelyTag2> > > <Item/> > > </LovelyTag2> > > </BadTag1> > > </LovelyTag1> > > </MyRoot> > > > > Is there any way to evaluate query: > > "I want to get all items with only LovelyTag1 and LovelyTag2 as > > ancestors (and myroot of course) but items with any parents except > > LovelyTag1 and 2 should be discarded". > > Well for your example > /MyRoot/LovelyTag1/LovelyTag2/Item > should do. > If there are more and arbitrary levels then it is not that easy. > > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
