Problemer med at splitte et xml schema i to
Jeg troede, jeg havde fået det til at være valid, men mine problemer skyldtes forkert opslitning af et ekisterende skema.Er der nogen, der kan splitte dette skema op i to dvs. et Person schema og et Car schema.
--------------------------------------
<xs:schema elementFormDefault='qualified' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='Person' nillable='true' type='Person' />
<xs:complexType name='Person'>
<xs:sequence>
<xs:element minOccurs='1' maxOccurs='1' name='Id' type='xs:long' />
<xs:element minOccurs='0' maxOccurs='1' name='FirstName' type='xs:string' />
<xs:element minOccurs='0' maxOccurs='1' name='LastName' type='xs:string' />
<xs:element minOccurs='1' maxOccurs='1' name='Age' type='xs:int' />
<xs:element minOccurs='1' maxOccurs='1' name='Gender' type='Gender' />
<xs:element minOccurs='0' maxOccurs='1' name='Cars' type='ArrayOfCar' />
</xs:sequence>
</xs:complexType>
<xs:simpleType name='Gender'>
<xs:restriction base='xs:string'>
<xs:enumeration value='Male' />
<xs:enumeration value='Female' />
</xs:restriction>
</xs:simpleType>
<xs:complexType name='ArrayOfCar'>
<xs:sequence>
<xs:element minOccurs='0' maxOccurs='unbounded' name='Car' nillable='true' type='Car' />
</xs:sequence>
</xs:complexType>
<xs:complexType name='Car'>
<xs:sequence>
<xs:element minOccurs='1' maxOccurs='1' name='Id' type='xs:long' />
<xs:element minOccurs='0' maxOccurs='1' name='Name' type='xs:string' />
<xs:element minOccurs='0' maxOccurs='1' name='Model' type='xs:string' />
<xs:element minOccurs='1' maxOccurs='1' name='Year' type='xs:int' />
<xs:element minOccurs='1' maxOccurs='1' name='Colour' type='Colour' />
</xs:sequence>
</xs:complexType>
<xs:simpleType name='Colour'>
<xs:restriction base='xs:string'>
<xs:enumeration value='Green' />
<xs:enumeration value='Blue' />
<xs:enumeration value='White' />
<xs:enumeration value='Black' />
<xs:enumeration value='Red' />
<xs:enumeration value='Silver' />
</xs:restriction>
</xs:simpleType>
</xs:schema>
------------------------------------------------------------------
Person schema skal naturlivis inkludere Car schema'et.