Re: Hierarchical query

From: Joe Kesselman <keshlam-nospam_at_comcast.net>
Date: Wed, 13 Jun 2007 15:37:41 -0400
Message-ID: <Ds6dnaEa37Mf2u3bnZ2dnUVZ_q3inZ2d_at_comcast.com>


Vadim Tropashko wrote:
> I have trouble comprehending this line
>
> (2) ../../statements//assignment/var[string() = $dvar/string()]
>
> should I read it left to right?

Find a good tutorial on XPath. Yes, it evaluates left to right. From the context node, find its parent; find the parent of that; find its <statements> children; find their <assignment> descendants (at any depth), find their <var> children whose string value is the same as ... hmmm. actually I'm not sure what $dvar/string() was intended to mean, and I don't have time right now to check that.

-- 
() ASCII Ribbon Campaign  | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Received on Wed Jun 13 2007 - 21:37:41 CEST

Original text of this message