ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Nichol" <snicholn...@scottnichol.com>
Subject Fw: Node.namespaceURI
Date Fri, 25 Jul 2003 16:09:37 GMT
Based on some interest expressed in having Apache SOAP support the Oracle convention of having
Node.namespaceURI return an empty string instead of null when there is no namespace, I posted
to www-dom@w3.org about whether the spec should further clarify what is meant by "null". 
This is the only response to date.

Scott Nichol


----- Original Message ----- 
From: "Fred L. Drake, Jr." <fdrake@acm.org>
To: "Scott Nichol" <scottnichol@comcast.net>
Cc: <www-dom@w3.org>
Sent: Friday, July 25, 2003 11:37 AM
Subject: Re: Node.namespaceURI


> 
> Scott Nichol writes:
>  > 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.
> 
> For Python, null is mapped to the None value, which is generally used
> in Python to indicate "no value".  The Python XML-SIG has gone round
> and round on the issue of whether to use an empty string or None for a
> missing namespace URI in the DOM, and we finally settled on None since
> that's really what's intended.
> 
>  > 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.
> 
> This sounds like a serious nuissance in those implementations.
> 
> But I think the spec spells out clearly that null is the right thing.
> If that's normally spelled using Java's null value, there's no need to
> change the specification; the implementations are clearly in violation
> and bug reports should be filed.
> 
> 
>   -Fred
> 
> -- 
> Fred L. Drake, Jr.  <fdrake at acm.org>
> PythonLabs at Zope Corporation

Mime
View raw message