[Mono-dev] XmlTextWriter: order of namespace declarations
gert.driesen at telenet.be
Thu Feb 9 04:43:14 EST 2006
Apparently the order in which namespace declarations are written by
Xml(Text)Writer differs between Mono and MS.NET.
I know this is very much implementation specific, and the fact that the
order is different in Mono is definitely not a bug.
However, this makes it difficult to write unit tests that pass on both Mono
and MS.NET for parts of Mono where XmlTextWriter is used internally.
To reproduce this "issue" (its not a bug, I know), compile and execute the
following code snippet:
public class EntryPoint
static void Main ()
StringWriter sw = new StringWriter ();
XmlTextWriter xtw = new XmlTextWriter (sw);
xtw.WriteStartElement ("x", "some:urn");
xtw.WriteAttributeString (null, "type",
Console.WriteLine (sw.ToString ());
<x d1p1:type="string" xmlns="some:urn"
<x d1p1:type="string" xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance"
Would it be possible to change our behaviour to match that of MS.NET ?
More information about the Mono-devel-list