Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XPath filters equivalence

From: Peter Flynn <peter.nosp@-.--------.-->
To: NULL
Date: 10/6/2007 8:00:00 PM

Altu wrote:
> Hi Joe,
> 
>> 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).
> 
> p1, p2, and p3 are simple paths that only have ., /, //, and * like
> 
>  ./a/b//c/d//*
> 
>  or
> 
>  //a/b//c//*
> 
>> 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.
> 
> Other than performance difference, if my predicates are also simple
> predicates like the case above, so I think they all return the same
> result, is this correct?

At this stage, why not download a copy of XPathTester and try it for 
yourself?

///Peter


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent