Each of these elements could have a super type:
<t:student id="s1"> <name>Jimmy</name> </t:student> <t:parent id="p1"> <name>Jimmy's Mom</name> <address> <street>123 Mars</street> <city>San Francisco</city><state>CA</state> </address> <children> <student ref="s1"/> </children> </t:parent> <t:teacher> <name>Dr. Evil</name> <students> <student ref="s1"/> </students> </t:teacher>
These could all have a base type of:
<xs:complexType name="PersonInfo"> <xs:sequence> <xs:element name="name" type="xs:string"/> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> </xs:complexType>