Bug 12584

Summary: Failures in XPath test suite at yvon-thoraval.com
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: XMLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: yt.dev
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.yvon-thoraval.com/DOM/xpath_svg_test_case.xhtml
Bug Depends on: 8791, 12581, 12602, 12619, 12733, 12807    
Bug Blocks:    

Description Alexey Proskuryakov 2007-02-04 08:36:09 PST
Several tests from the bug URL where our results differ from Firefox:

//xhtml:option[text() = '//xhtml:option]
//xhtml:option[string() = '//xhtml:option]
//xhtml:option[string(.) = '//xhtml:option]
//xhtml:a[not(preceding::xhtml:a/@href = @href )]
//svg:g[@id = 'r_00']

Haven't looked beyond this first SVG test.
Comment 1 Alexey Proskuryakov 2007-02-05 12:03:21 PST
Those seem to be OK now :-). Here are the results that are different at the moment (ignoring failures caused by bug 12581):

"//svg:g[@id = 'r_24']/ancestor::*"
"//svg:g[@id = 'r_24']/ancestor::svg:*"
"//svg:g[@id = 'r_24']/ancestor::svg:g"
"//svg:g[@id = 'r_00']/following::svg:*"
"//svg:g[@id = 'r_24']/descendant::svg:*"
"//svg:g[@id = 'r_00']/preceding::node()"
"//svg:g[@id = 'r_00']/preceding::svg:*"
"//svg:g[@id = 'r_00']/preceding::svg:rect"
Comment 2 Maciej Stachowiak 2007-02-17 04:00:10 PST
We should consider adding this test suite to the layout tests in some form.
Comment 3 Alexey Proskuryakov 2007-02-18 01:26:21 PST
There are two tests with different number of results left (plus, the order of results is sometimes wrong, which is also a WebKit bug):

//svg:g[@id = 'r_00']/preceding::node()
//svg:g[number(substring-after(@id,'r_')) or (substring-after(@id,'r_')=0)]

(In reply to comment #2)
> We should consider adding this test suite to the layout tests in some form.

The amount of bugs uncovered by this suite is such that the tests landed with fixes already cover most of it :-). What I'd really want is to import a complete XPath test suite such as the OASIS one - but that's non-trivial, because it uses XSLT to test XPath.
Comment 4 Alexey Proskuryakov 2007-02-18 09:09:34 PST
(In reply to comment #3)

> //svg:g[@id = 'r_00']/preceding::node()

  The difference here is due to DOCTYPE missing from DOM in WebKit.

> //svg:g[number(substring-after(@id,'r_')) or (substring-after(@id,'r_')=0)]

  Fixed in bug 12807.
Comment 5 Alexey Proskuryakov 2007-10-30 07:46:10 PDT
The test is no longer available - but we've fixed all of the issues already anyway (except for the DOCTYPE one, which isn't an XPath bug).