Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Complicated XPATH to return a nodeset based on a sibling node's value [Thread Next] Re: Complicated XPATH to return a nodeset based on a sibling node's valueTo: NULL Date: 9/2/2004 12:29:00 AM In article <2pklh9Flek0fU1@u...>, Patrick TJ McPhee <ptjm@i...> wrote: % a[a1/@attr = "key" and a1 = "Use"]/a1[@attr = "val"] There's a subtle error here. It should be a[a1[@attr = "key" and . = "Use"]]/a1[@attr = "val"] You could read this as `the set of a1 elements with attribute attr equal to "val", whose parent element is an a element which has a child a1 element, which has attribute attr equal to "key" and whose text content is "Use"'. The incorrect version might read `the set of a1 elements with attribute attr equal to "val", whose parent element is an a element which has a child a1 element which has attribute attr equal to "key" and which also has a child a1 element whose text content is "Use"'. Sorry. -- Patrick TJ McPhee East York Canada ptjm@i... | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
