I'm writing an XSD schema which has an element that describes a file structure:
<xs:schema
...
>
<xs:element name="FileStructure">
<xs:complexType>
<xs:sequence>
<xs:element ref="Folder" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Folder">
<xs:complexType>
<xs:sequence>
<xs:element ref="Folder" minOccurs="0" maxOccurs="unbounded" />
<xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="AccessionFile">
<xs:complexType mixed="true">
...
</xs:complexType>
</xs:element>
</xs:schema>
When I run this through XSD.exe, I end up with classes for FileStructure
, Folder
, and File
. FileStructure has a property called Folder which holds an array of Folders; Folder has a property called Folder1 which holds an array of Folders.
I don't want the property on Folder to be called Folder1. How do I specify names for properties and types when using XSD.exe?