I hope I am correctly phrasing my problem. When we run the xsd tool on our xsd to create classes, the code is not exactly representing the xsd on one section. It is like this:
XSD: 'BaliseGroups' => Collection of 'BaliseGroup' => Collection of 'Balise'
Code: 'BaliseGroups' => Collection of type 'Balise' named 'BaliseGroup'...
<xs:element name="BaliseGroups"> <xs:annotation> <xs:documentation>Een verzameling balisegroepen</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="BaliseGroup" type="tBaliseGroup"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="tBaliseGroup"> <xs:annotation> <xs:documentation>Een balisegroep, </xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="Balise" type="tBalise" minOccurs="1" maxOccurs="8"/> </xs:sequence> </xs:complexType> <xs:complexType name="tBalise"> <xs:annotation> <xs:documentation>Type voor een balise</xs:documentation> </xs:annotation> <xs:complexContent> <xs:extension base="tTrackAsset"/> </xs:complexContent> </xs:complexType> Code
public partial class BaliseGroups { private tBalise[] baliseGroupField; /// <remarks/> [System.Xml.Serialization.XmlArrayItemAttribute("Balise", IsNullable = false)] public tBalise[] BaliseGroup { get { return this.baliseGroupField; } set { this.baliseGroupField = value; } } } As you can see in the generated C# code block it creates a Property BaliseGroup of type Balise[]. This should be of type tBaliseGroup[].
I have a conjecture that there is something wrong with the xsd, but I cannot figure out what..
No comments:
Post a Comment