[Mono-devel-list] XML Test cases

David Sheldon dave-monolist at earth.li
Wed Dec 17 13:10:16 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?

David
-- 
"Backups are for wimps. Real men upload their data
   to an FTP site and have everyone else mirror it." - Linus Torvalds



More information about the Mono-devel-list mailing list