<xs:element name="Kunde" type="tKunde"/> <xs:complexType name="tKunde"> <xs:union memberTypes="tPerson tStudent"></xs:union> </xs:complexType> <xs:complexType name="tPerson"> <xs:sequence> <xs:element name="Vorname" type="xs:string"/> <xs:element name="Nachname" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="tStudent"> <xs:complexContent> <xs:extension base="tPerson"> <xs:sequence> <xs:element name="Matrikelnummer" type="xs:int" minOccurs="0" maxOccurs="1"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType>
Here's how it should look. The task is to remove the student from the Person, and then give the opportunity to use one of two types for the Kunde element.
This seems unacceptable.
xml union xsd
kmindi
source share