Comment #3 on issue 15742 by normanr: document.evaluate doesn't match with xpath functions (local-name, name) http://code.google.com/p/chromium/issues/detail?id=15742
Fx: jsdom: localName = 'HTML', nodeName = 'HTML', tagName = 'HTML' - xpath name() = 'HTML' WebKit: jsdom: localName = 'html', nodeName = 'HTML', tagName = 'HTML' - xpath name() = 'html'. So it looks like xpath name() is returning localName, which is a different case between WebKit and Gecko, which is confusing (for developers). My primary concern here is that webpages and userscripts will fail when the xpath doesn't work across browsers. I also tried lower-case(name()) but I couldn't get that to work. I think ignore-case functionality is bad - XML is supposed to be case-sensitive, but it would be nice to have lower-case and upper-case is all browsers (Fx3.0 doesn't) so that you didn't have to do this: document.evaluate( "//*[translate(name(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='html']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null ).snapshotItem(0).tagName (which works perfectly by the way is both Fx3.0 and Chrome) -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ Automated mail from issue updates at http://crbug.com/ Subscription options: http://groups.google.com/group/chromium-bugs -~----------~----~----~----~------~----~------~--~---
