[Mono-list] xml bug?

Atsushi Eno atsushi@ximian.com
Wed, 21 Jan 2004 00:17:08 +0900


Well, I think it is good way to make difference. However even if we
distinguish String.Empty from null at creation, get_NamespaceURI()
should return String.Empty. So there will be no way for users to get 
which (null or String.Empty) alternative was chosen.

Atually these two calls result in the same (under MS.NET 1.1):

	 XmlElement b2 = d.CreateElement ("b2");
	 XmlElement b2 = d.CreateElement ("b2", "");

(However, these difference are made under XmlTextWriter. So
WriteStartElement("","b2","") actually outputs xmlns="", while 
WriteStartElement ("b2") does not.)

Atsushi Eno

David Sheldon wrote:

> On Tue, Jan 20, 2004 at 03:54:52PM +0900, Atsushi Eno wrote:
>>a) supply no xmlns for default namespace
>>This looks more de facto standard way. I wrote similar code with jdk 1.5 
>>and got the same result as MS.NET.
> Will this be differentiated from the null-namespace? If I did
>  b = x.CreateElement("b", "namespace");
>  b2 = x.CreateElement("b2", "");
>  b.AppendChild(b2);
> Where I would expect b2 to have the xmlns="" attribute.
> David