You can also just add attributes by extension:
This adds an 'id' attribute to the previous type:
<xs:complexType name="TeacherWithId"> <xs:complexContent> <xs:extension base="my:Teacher"> <xs:attribute name="id" type="xs:ID"/> </xs:extension> </xs:complexContent> </xs:complexType>