W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2003

Re: Node.namespaceURI

From: Philippe Le Hegaret <plh@w3.org>
Date: 28 Aug 2003 13:16:41 -0400
To: Scott Nichol <scottnichol@comcast.net>
Cc: WWW DOM <www-dom@w3.org>
Message-Id: <1062091000.23313.78.camel@jfouffa.w3.org>

On Fri, 2003-07-25 at 11:20, Scott Nichol wrote:
> 
> 
> This regards Node.namespaceURI in the DOM 3 Core.  Going back to DOM 2, this attribute's description has started "The namespace URI of this node, or null if it is unspecified".  To me, this seems quite clear, and in programming languages like Java, I expect a null value in that language to be returned.
> 
> However, there are implementations that do not use what I would consider to be a null.  For example, Oracle's XML parser's Node.getNamespaceURI() returns an empty (zero-length) string, and Microsoft's .NET framework (the NamespaceURI property of the System.Xml.XmlNode class) likewise returns an empty string.
> 
> I would like to see DOM 3 Core clarify or amend the statement "The namespace URI of this node, or null if it is unspecified".  If implementations returning empty strings are to be considered out-of-spec, please specify this explicitly.  If returning a zero-length string is an acceptible implementation according to the standard, please state this.  If this issue is clarified elsewhere in the DOM 3 spec, please refer to that place from the description of Node.namespaceURI.

We clarified the XML Namespaces section and replace the sentence in the
3rd paragraph with the following one:
[[
In programming languages where empty strings can be differentiated from
null, empty strings, when given as a namespace URI, are converted to
<code>null</code>.
]]

A link has been added from Node.namespaceURI to the XML namespaces
section.

Philippe
Received on Thursday, 28 August 2003 13:16:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:57 GMT