Re: Node.namespaceURI

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 UTC