Re: Hierarchical query

From: Jan Hidders <hidders_at_gmail.com>
Date: Wed, 13 Jun 2007 14:32:18 -0700
Message-ID: <1181770338.710744.231520_at_i38g2000prf.googlegroups.com>


On 13 jun, 21:37, Joe Kesselman <keshlam-nos..._at_comcast.net> wrote:
> 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.

It retrieves the text node children of the nodes in $dvar. Actually it is unnecessary, in this case I might just have well have written the predicate as [. = $dvar].

  • Jan Hidders
Received on Wed Jun 13 2007 - 23:32:18 CEST

Original text of this message