We want want to model teachers who have students and the parents of the students.
Naively, we start with a nice extension hierarchy: teacher.xsd
The key bit is this part:
<xs:element name="district" type="my:District"/> <xs:complexType name="District"> <xs:sequence> <xs:element ref="my:person" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:element name="person" type="my:PersonInfo"/> <xs:complexType name="PersonInfo"> <xs:sequence> <xs:element name="name" type="xs:string"/> </xs:sequence> </xs:complexType>
Here we reference the "base type" of "PersonInfo" via an element in our content model for the type 'District'.
Regardless of type, the element name must be 'my:person' so the elements student/person/teacher can't be used.