It is very simple and reasonable because it was *the* expected behavior in XmlWriter. You can verify that by replacing "XmlWriter.Create() with "new XmlTextWriter()" and test it under .NET.
And XmlWriter implementations should not differentiate the behaviors at least with no reason. It was .NET 2.0 that broke the rule. A fix will land in svn anyways. Atsushi Eno On 2010/03/15 20:50, Andrus wrote: > In Mono 2.4.2.2 XmlTextWriter.WriteStartAttribute throws exception below is > using open-source Yogesh ExcelXml class. > In .NET 3.5 same code works OK > > How to fix ? > > Andrus. > > [System.ArgumentException]: Namespace URI must not be null when prefix is > not an empty string. > at System.Xml.XmlTextWriter.WriteStartAttribute (System.String prefix, > System.String localName, System.String namespaceUri) [0x00272] in > /root/src/mono-2.4.2.2/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs:886 > at System.Xml.XmlWriter.WriteAttributeString (System.String prefix, > System.String localName, System.String ns, System.String value) [0x00000] in > /root/src/mono-2.4.2.2/mcs/class/System.XML/System.Xml/XmlWriter.cs:243 > at Yogesh.ExcelXml.XmlStyle.Export (System.Xml.XmlWriter writer) [0x00000] > at Yogesh.ExcelXml.ExcelXmlWorkbook.Export (System.IO.Stream stream) > [0x00000] > ... > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > > > > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
