Bug 12413

Summary: Misunderstood NameSpace with DOM Level 3 XPath
Product: WebKit Reporter: Une Bévue <yt.dev>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, cdumez, 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

Description Une Bévue 2007-01-26 03:24:06 PST
WebKit doesn't honor correctly the namespace for an xhtml document having to used namespaces : 'xhtml' and 'svg'.

See the page given in reference, at the top left corner the image is an svg one.
The select tag allows to choose différent XPath expressions, notices all are replicated for example for the firsts two :

//body       <!-- works only with WebKit build 19107-->
//xhtml:body <!-- works with Firefox 2.0.0.1 and Opera 9.1 -->

It seems this is ONLY a namespace prob because firstly all the XPath expression are correctly understood by WebKit and secondly notice WebKit never calls the function nsResolver(prefix) which returns the corresponding NameSpaceURI.

The page logs the result of the XPath expression (below XPath expression result log), shows the source code of the page itself (below SOurce code of this page and finally a WebKit log (bottom of the page) corresponding to the "WebKitDetect.js".

Notice also i'll add new expressions in order to test most of the XPath functionnality.

Best,

Yvon
Comment 1 Alexey Proskuryakov 2007-01-28 11:25:17 PST

*** This bug has been marked as a duplicate of 8791 ***
Comment 2 Alexey Proskuryakov 2007-02-03 01:23:59 PST
With bug 8791 fixed, this test suite seems to uncover quite a number of issues with our XPath implementation. We'll need separate bugs to track those, of course.
Comment 3 Alexey Proskuryakov 2007-02-04 05:31:11 PST
Bug 12581 for plain "//title" matching <title> in XHTML (affects many tests).
Comment 4 Lucas Forschler 2019-02-06 09:03:56 PST
Mass moving XML DOM bugs to the "DOM" Component.