[Mono-dev] XmlTextWriter: order of namespace declarations
Atsushi Eno
atsushi at ximian.com
Thu Feb 9 12:54:37 EST 2006
Well, if it does not cause any regressions and bad performance,
it is OK. There is no reason to reject such a patch. Anyone *who
thinks it matters* should (feel free to) spend his/her/its own
resources i.e. time to create a fix, or pay someone to fix it.
I don't think it is not worthy of spending Novell's resources.
We are not playing a game, nor spending resources on someone's
hobby, but doing businesses.
Atsushi Eno
Lluis Sanchez wrote:
> Hi,
>
> IMHO, the rule "if something works don't touch it" applies here. Maybe
> we just need smarter unit tests.
>
> Lluis.
>
> El jue, 09-02-2006 a las 10:43 +0100, Gert Driesen escribió:
>> Hi,
>>
>> 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:
>>
>> using System;
>> using System.IO;
>> using System.Xml;
>>
>> public class EntryPoint
>> {
>> static void Main ()
>> {
>> StringWriter sw = new StringWriter ();
>>
>> XmlTextWriter xtw = new XmlTextWriter (sw);
>> xtw.WriteStartElement ("x", "some:urn");
>> xtw.WriteAttributeString (null, "type",
>> "http://www.w3.org/2001/XMLSchema-instance", "string");
>> xtw.WriteEndElement ();
>> xtw.Flush ();
>>
>> Console.WriteLine (sw.ToString ());
>> }
>> }
>>
>> Actual result:
>>
>> <x d1p1:type="string" xmlns="some:urn"
>> xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance" />
>>
>> Expected result:
>>
>> <x d1p1:type="string" xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns="some:urn" />
>>
>> Would it be possible to change our behaviour to match that of MS.NET ?
>>
>> Gert
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
More information about the Mono-devel-list
mailing list