W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: [selectors-api] Test Suite Missing tests for Namespace Selectors

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 12 Mar 2009 16:02:16 +0100
Message-ID: <49B923F8.6030903@lachy.id.au>
To: Alexey Proskuryakov <ap@webkit.org>
Cc: public-webapps <public-webapps@w3.org>
Alexey Proskuryakov wrote:
> 12.03.2009, в 17:19, Lachlan Hunt написал(а):
>> WebKit has a bug with the "|foo" selector.
>> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/28
>> Opera and Firefox pass
> This is actually a difference in createElementNS(null, "p") vs. 
> createElementNS("", "p") behavior. I don't know whose bug it is, but in 
> Firefox and Opera, empty and null namespace arguments both result in 
> null namespace for the created element.
> When createElement(null, "p") is used, this test passes in WebKit, too.

DOM 3 Core states [1]:

   "In programming languages where empty strings can be differentiated
    from null, empty strings, when given as a namespace URI, are
    converted to null"

So, if I understand correctly, createElementNS("", "p") is effectively 
the same as createElementNS(null, "p").

Interestingly, though, Opera has the opposite bug.  We fail when null is 
passed instead of "".


Lachlan Hunt - Opera Software
Received on Thursday, 12 March 2009 15:02:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 14:36:33 UTC