[Mono-devel-list] XML Test cases

Lluis Sanchez lluis at ximian.com
Wed Dec 17 15:23:50 EST 2003

> I have been looking at some of the failing tests for System.XML. 
> MonoTests.System.Xml.XmlSerializerTests.TestSerializeNullObject
> and MonoTests.System.Xml.XmlSerializerTests.TestSerializeNullString,
> for example, are comparing a serialized version of the object with an 
> expected result using string comparison.
> For SerializeNullObject, mono produces 
>   <anyType d1p1:nil='true' xmlns:d1p1='http://www.w3.org/2001/XMLSchema-instance' />
> but we are comparing this to
>   <anyType xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:nil='true' />
> Now the XML is equivalent. There is an anyType element in the
> null-namespace, and a "nil" attribute in the
> "http://www.w3.org/2001/XMLSchema-instance" namespace, with the value
> "true". It would be nicer if we used the 'xsi' prefix rather than
> 'd1p1', but it does not affect the meaning of the XML.
> My question is: are we aiming to produce exactly the same output string
> as Microsoft, or just equivalent XML? If the latter, should we look at
> another way of doing these asserts in the tests, so that this would pass?

Yes. Actually, I have a fix for this. I'll commit it soon.


> David

More information about the Mono-devel-list mailing list