Bugzilla – Bug 314414
classes generated by Mono xsd.exe are not the same as MS xsd.exe
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by paco@mfcon.com 2004-04-16 08:23:54 MST ---- If I use Mono's xsd.exe to generate a *.cs file using /c option for the file: http://forge.novell.com/modules/xfmod/cvs/cvsbrowse.php/prj2make-sharp/mfcon/cs/prj2make-sharp/schemas/sharp_d_prjx.xsd?rev=1.2&content-type=text/vnd.viewcvs-markup I have a problem with the classes generated that I don't have when I generate it using Microsoft xsd.exe. One of the differences that helps pinpoint the probem is that the code generated by Mono xsd.exe does not create the Class "References" as an array of of the type "Reference", were Microsoft xsd.exe seems to genereate the types the way I was expecting it. It appears that the difference may be in the use of attributes. For example: MS - /// <remarks/> [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)] public Reference[] References; Mono - /// <remarks/> public References References; (further down is declared as:) /// <remarks/> public class References { /// <remarks/> [System.Xml.Serialization.XmlElement()] public Reference[] Reference; } The comand line used to generate the C# files was: MS - xsd sharp_d_prjx.xsd /c Mono - xsd sharp_d_prjx.xsd /c the same for both. ---- Additional Comments From paco@mfcon.com 2004-04-16 08:25:35 MST ---- Created an attachment (id=165898) Generated by MS xsd.exe ---- Additional Comments From paco@mfcon.com 2004-04-16 08:26:43 MST ---- Created an attachment (id=165899) Generated with Mono xsd.exe ---- Additional Comments From paco@mfcon.com 2004-04-16 08:28:08 MST ---- Created an attachment (id=165900) Schema created with XML Spy ---- Additional Comments From lluis@ximian.com 2004-04-20 13:36:07 MST ---- Fixed in CVS. Imported an attachment (id=165898) Imported an attachment (id=165899) Imported an attachment (id=165900)