[Mono-dev] [PATCH] Patch for XmlElement.Prefix

Atsushi Eno atsushi at ximian.com
Mon Dec 26 09:35:52 EST 2005


Hi,

The patch is in svn (though I believe it should be
InvalidOperationException
rather than ArgumentException for attempt to change read-only node. Oh,
yes
it would be another waste of time to discuss about it). Thanks.

Atsushi Eno

> Good day.
>  
> There is another incompatibitily of Mono and MS.NET. This time it's in
> the details of implementation for XmlElement.Prefix propertie - in
> set_Prefix method. These differences are:
> 1. Mono implementation doesn't allow to set String.Empty for prefix -
> it throws Exception, that value is not NCName. MS just set void prefix
> for element. I've attached test case for it: "xmlvalid.exe
> prefix-example.exe" runs on .NET and fails for Mono. Attached patch
> fixes it.
> 2. In case of read-only element, ArgumentException should be fired (as
> noted in MSDN), but not it's XmlException throws. I've changed it
> also.
> 3. In case of null value passed to set_Prefix, .NET throws
> ArgumentNullException, but Mono throws NullReferenceException. This is
> fixed too.
>  
> Please somebody, review XmlElement.cs.diff patch and if it's Ok,
> submit in SVN.
>  
> Thank you.
>  
> Воробьев Максим, Компания "Крок"
> тел. (+095) 974-22-74 (внутр. 2207)
> http://www.croc.ru
> mvorobiev at croc.ru
>  
> _______________________________________________
> 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