Bug 314414 (MONO57133) - classes generated by Mono xsd.exe are not the same as MS xsd.exe
Summary: classes generated by Mono xsd.exe are not the same as MS xsd.exe
Status: RESOLVED FIXED
Alias: MONO57133
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other All
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Lluis Sanchez
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: interop
Depends on:
Blocks:
 
Reported: 2004-04-16 15:23 UTC by Francisco "Paco" Martinez
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Generated by MS xsd.exe (8.28 KB, text/plain)
2004-04-16 15:25 UTC, Thomas Wiest
Details
Generated with Mono xsd.exe (7.42 KB, text/plain)
2004-04-16 15:26 UTC, Thomas Wiest
Details
Schema created with XML Spy (5.55 KB, text/plain)
2004-04-16 15:28 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:34:15 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)