Thank you Bruce,
 
I failed to find a good example to show how two interpretations would generate 
different outputs.  They might always get the same results (either).
 
I will read more and try to digest as you suggested.
 
 
Thanks again,
Ming
  

________________________________
 From: Bruce Miller <bruce.mil...@nist.gov>
To: Ming Chen <ciming.c...@yahoo.com> 
Cc: "xml@gnome.org" <xml@gnome.org>; Liam R E Quin <l...@holoweb.net>; 
"mhy...@ustc.edu" <mhy...@ustc.edu> 
Sent: Friday, January 20, 2012 10:14 PM
Subject: Re: [xml] How could I understand the slightly difference of the 
parsing process of E1/E2[E3] and E1[E2][E3]?
  
On 01/20/2012 12:46 AM, Ming Chen wrote:
> Thank you Bruce,
> My colleague began to have some approval of dealing a step (regardless of how
> many predicates attached) as a whole, //rec/(para[1]). That is a big progress
> for me.
> We are following the XPath 2.0 spec. Are the both have the same behaviour 
> about
> the parsing of steps with predicates?

Frankly, I haven't spent much time looking at the XPath 2
spec, since I would be wishing for features I can't use
in my current applications...

> While we still cannot reach an agreement about the DFS and BFS dispute. For
> example, step1/step2/step3/step4, assume that each has multiple matched nodes,
> should it be interpreted as step1/(step2/(step3/step4)) or
> ((step1/step2)/step3)/step4?

Either, depending on what you mean by the parentheses :>

You might try the XPath 1 spec as (possibly) being shorter
and easier to digest; especially section 2 about Location Paths:
  "The initial sequence of steps selects a set of nodes
   relative to a context node. Each node in that set
   is used as a context node for the following step.
   The sets of nodes identified by that step are unioned together."

Hope that helps;
bruce

> 
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to