Strategy: Types are the basis of re-use and not elements.
Make all your types (complex & simple) global.
The exceptions:
Children that are lists of other elements:
<xs:complexType name="department"> <xs:sequence> <xs:element name="xs:string"/> <xs:element name="people"> <xs:complexType> <xs:sequence> <xs:element ref="my:person" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType>
Any element who's type can be justified as always being "local" to that element (a slippery slope):
<xs:complexType name="pipeline"> <xs:sequence> <xs:element name="version-information" minOccurs="0"> <xs:complexType mixed="true"> <xs:sequence> <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:anyAttribute processContents="lax"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType>