<!-- define simple types -->
<xsd:simpleType name="colorType">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="purple"/>
		<xsd:enumeration value="orange"/>
		<xsd:enumeration value="blue"/>
		<xsd:enumeration value="grey"/>
	</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="sizeType">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="M"/>
		<xsd:enumeration value="L"/>
		<xsd:enumeration value="XL"/>
	</xsd:restriction>
</xsd:simpleType>
	
	
<!-- define attribute group -->
<xsd:attributeGroup name="clothesAttrGroup">
	<xsd:attribute name="quantity" type="xsd:nonNegativeInteger" />
	<xsd:attribute name="color" type="colorType" />
	<xsd:attribute name="size" type="sizeType" />
	<xsd:attribute name="material" type="xsd:string" />
</xsd:attributeGroup>


<!-- define elements -->
<xsd:element name="shirt">
	<xsd:complexType>
		<xsd:attributeGroup ref="clothesAttrGroup" />
	</xsd:complexType>
</xsd:element>
	
<xsd:element name="sweatshirt">
	<xsd:complexType>
		<xsd:attributeGroup ref="clothesAttrGroup" />
	</xsd:complexType>
</xsd:element>

