[Mono-dev] [PATCH] fix for bug in XmlSchema

James Fitzsimons james.fitzsimons at gmail.com
Sun May 18 13:01:40 EDT 2008


Hi all,

While porting Spring.NET to run on Mono on linux I have discovered a small
bug in the GetResolvedUri method of the XmlSchema class.

I have a custom XmlResolver which was getting passed an incorrectly
formatted Uri by the XmlSchema class. My uri was of the form
asembly://Spring.Core/Spring.Objects.Factory.Xml/spring-objects-1.1.xsd, and
was returned to me as
asembly://spring.core/Spring.Objects.Factory.Xml/spring-objects-1.1.xsd by
the GetResolvedUri method. The casing is a problem as Spring.Core is the
assembly name and mono won't find an assembly called spring.core.dll. The
one line patch changes the GetResolvedUri to return the OriginalString under
the .NET 2.0 profile which solves this problem. This is the same behaviour
as the Microsoft.NET framework.

I've included a test case as well, the attached schema file is needed for
the test.

Cheers,
James Fitzsimons
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080518/8e917820/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XmlSchema.patch
Type: text/x-diff
Size: 3167 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080518/8e917820/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resolveUriSchema.xsd
Type: application/octet-stream
Size: 808 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080518/8e917820/attachment-0001.obj 


More information about the Mono-devel-list mailing list