[Mono-dev] XmlWriter.WriteAttributeString incompatible with MS implementation

David Mitchell dmitchell at logos.com
Tue Feb 3 13:36:07 EST 2009


I'm currently trying to port the back-end of a very large project over to OSX
from Windows, and I've encountered a rather vexing incompatibility between
Mono and Microsoft's implementation of .NET.

The documentation for XmlWriter.WriteAttributeString(string prefix, string
localName, string ns, string value) seems to indicate that if a prefix is
provided and a namespace is not, that the method may throw an
ArgumentException, and this is what Mono does. However, Microsoft's
implementation allows this scenario if the given prefix has already been
associated with a namespace.

This wouldn't be a terribly big deal, except that the XmlWriter provides no
way to determine the namespace associated with a prefix, and we have many
cases in which we only have a prefix to work with. Is there any chance of
getting this behavior modified to conform to Microsoft's implementation? I'd
submit a patch myself, but as I was investigating this issue with a
coworker, he opened up the relevant classes in Reflector, so I'm tainted...

Thanks,
--Dave
-- 
View this message in context: http://www.nabble.com/XmlWriter.WriteAttributeString-incompatible-with-MS-implementation-tp21815568p21815568.html
Sent from the Mono - Dev mailing list archive at Nabble.com.



More information about the Mono-devel-list mailing list