W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

Re: [selectors-api] Why null as opposed to empty string (or either one) to resolve default namespace

From: Alexey Proskuryakov <ap@webkit.org>
Date: Mon, 14 Jul 2008 09:52:49 +0400
Cc: Boris Zbarsky <bzbarsky@MIT.EDU>, public-webapps@w3.org
Message-Id: <96D85146-5624-4F1C-B832-A66857A75E12@webkit.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>


On Jul 12, 2008, at 12:20 AM, Bjoern Hoehrmann wrote:

>> For what it's worth, it looks to me like Gecko returns the default
>> namespace if "" is passed to lookupNamespaceURI.  It's not clear to  
>> me
>> whether that's correct per the DOM3 Core spec.
>
> It is, because it requires that for `null`, and requires to treat  
> empty
> strings the same as `null` whenever namespace names are specified.


WebKit returns null if "" is passed to lookupNamespaceURI. I was going  
to fix it, but could not find any reference to this behavior in DOM 3  
Core. The closest thing I found was "In programming languages where  
empty strings can be differentiated from null, empty strings, when  
given as a namespace URI, are converted to null" - but the parameter  
to lookupNamespaceURI is not a namespace URI.

So, it seems to me that WebKit behavior is correct by the letter of  
the spec.

- WBR, Alexey Proskuryakov
Received on Monday, 14 July 2008 07:38:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:27 GMT