Re: [xml] xpath evaluation issue on 2.9.0
- From: "Martin (gzlist)" <gzlist googlemail com>
- To: Mike Dalessio <mike dalessio gmail com>
- Cc: xml <xml gnome org>
- Subject: Re: [xml] xpath evaluation issue on 2.9.0
- Date: Wed, 13 Mar 2013 11:43:33 +0000
On 12/03/2013, Mike Dalessio <mike dalessio gmail com> wrote:
I've opened a bug report here:
https://bugzilla.gnome.org/show_bug.cgi?id=695699
The summary is that behavior of `position()` under 2.9.0 is different than
under 2.8.0 and other major XML libraries (e.g., javax.xml.xpath).
The 2.9 behaviour looks correct to me.
Given your sample document in the bug report, the logic is as follows:
//foo[position() = 1]
'//foo' selects (foo, foo, foo, foo)
the predicate picks out the first foo
//*[position() = 1 and self::foo]
'//*' selects (root, foo, foo, foo, foo)
on root, the predicates evaluates as [1 = 1 and ()] -> false
on the first foo, it evaluates as [1 = 2 and (foo)] -> false
and so on, so no node matches
Please take a look at the bug report and let me know if any further
information is necessary?
Which other xpath implementations did you try exactly? I'm curious
what saxon does.
Martin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]