[Webkit-unassigned] [Bug 15436] New: Wrong proximity positions for XPath reverse axes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 9 07:30:52 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=15436
Summary: Wrong proximity positions for XPath reverse axes
Product: WebKit
Version: 522+ (nightly)
Platform: PC
URL: http://amachang.art-code.org/xpath_functional_test/
OS/Version: Windows XP
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: nanto at moon.email.ne.jp
In XPath 1.0, the context position of a node in a node-set for a reverse axis
is defined by reverse document order [1]. But WebKit uses document order for
ancestor, ancestor-or-self, and preceding axes and arbitrary order for
preceding axis. Think the following code:
<ul>
<li id="li1">foo</li>
<li id="li2">bar</li>
<li id="li3">baz</li>
</ul>
<script type="text/javascript">
alert(document.evaluate('preceding-sibling::*[1]',
document.getElementById('li3'), null, 8, null)
.singleNodeValue.id);
</script>
WebKit alerts "li1" while Gecko and Opera alerts "li2". This is revealed by
amachang's XPath test (see the URL field).
[1] http://www.w3.org/TR/1999/REC-xpath-19991116#predicates
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list