[xquery-talk] XQuery question about accessing ancestor/parent nodes of return values

Liam Quin liam at w3.org
Fri May 9 17:52:25 PDT 2008


On Fri, May 09, 2008 at 04:36:00PM -0400, Steve Taylor wrote:
> For example , here is a small subset from my test XML document (using
> completely made up names and addresses) and following that is my Xquery. I
> highlighted the matching node tag for my XQuery for easy identification:

Note that archived lists tend to filter out HTML-format mail,
so I think your highlighting didn't make it...

> for $address in //Company/Person/Address
> where $address/Zipcode = '12345'
> return $address

I think you want
  return $address/..

Liam

-- 
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/


More information about the talk mailing list