I feel like I'm spamming the place, but these are all the things that I encounter during work.
Anyways:
I made a base complex type:
Expand|Select|Wrap|Line Numbers
- <xs:complexType name="BaseLocationType">
- <xs:sequence>
- <xs:element name="Path" type="xs:string" maxOccurs="1" minOccurs="1" />
- <xs:element name="Files" type="xs:string" minOccurs="0" maxOccurs="1" />
- </xs:sequence>
- </xs:complexType>
Expand|Select|Wrap|Line Numbers
- <xs:complexType name="LocalDiskType">
- <xs:complexContent>
- <xs:extension base="BaseLocationType">
- <xs:sequence>
- <xs:element name="Drive" type="xs:string" minOccurs="1" maxOccurs="1" />
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
If I'm doing something wrong here or if my logic is false, please tell me.
But as far as I can interprete the documentation that I read this should work. This would also imply that I can use this element as follows:
Expand|Select|Wrap|Line Numbers
- <Location>
- <LocalDisk>
- <Path></Path>
- <Drive>C</Drive>
- </LocalDisk>
- </Location>
BUT! Very important! If I leave the <Path> tag out, VS2003 complains because it was expecting a <Path> tag.
I don't know why he does that, but I would love to have a solution that is clean.
Greetings,
- SL33PY