Support for xs:list?

Jan 21, 2010 at 7:25 PM

I've been learning XSD this week and trying to generate corresponding C# classes from my schemas.

Neither xsd.exe nor Xsd2Code seems to do what I expected for xs:list.  For example, this schema:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="">

   <xs:element name="Data" type="ObjectType" />

   <!-- list of ints -->
   <xs:simpleType name="IntListType">
      <xs:list itemType="xs:int" />
   <!-- holder of list of ints -->
   <xs:complexType name="ObjectType">
         <xs:element name="Data1" type="xs:int" />
         <xs:element name="Data2" type="IntListType" />


seems to create a class containing and int and a string, but I'd kinda-sorta hoped for a class containing an int and an int[] (or List<int>).

Am I doing something wrong?