![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - XPath filters equivalence >Thread Next - Re: XPath filters equivalence Re: XPath filters equivalenceTo: NULL Date: 10/6/2007 7:28:00 AM Altu wrote: > Is [p1][p2][p3] the same as [p1 AND p2 and p3] in XPath? Depends on the predicate. If p2 or p3 tests position() or last(), _NO_ -- the latter form would test position in the original set, while the former would test position in the set that has gotten past the preceeding filter(s). > Also if I have a predicate that starts with "/" or "//", does it > matter where in the XPath expression it is? > /a[/a/b]/c/d > /a/c[/a/b]/d > /a/c/d[/a/b] In these examples: no, since an absolute XPath by definition ignores its context and since if it fails in any of these the result is that we find no nodes. (Though for performance reasons in typical processors, you will probably want to test it earlier rather than later). In more complicated XPaths, maybe. -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
