<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:simpleType name = "validCountries">
      <xsd:restriction base="xsd:string">
          <xsd:enumeration value="china" />
          <xsd:enumeration value="germany" />
          <xsd:enumeration value="usa" />
      </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="shoeType">
    <xsd:sequence>
      <xsd:element name="make">
        <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="makename" type="xsd:string"/>
        </xsd:sequence>
        <xsd:attribute name="makeid" type="xsd:integer" />
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="price" type="xsd:integer" />
      <xsd:element name="colour" type="xsd:string" minOccurs = "0" />
      <xsd:element name="country" type="xsd:string" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="shoeid" type="xsd:integer" />
  </xsd:complexType>

  <xsd:element name="shoes">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="shoe" type="shoeType" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>

  <xsd:key name="uniqueShoeid">
    <xsd:selector xpath=".//shoes/shoe"/>
    <xsd:field xpath="@shoeid"/>
  </xsd:key>
  <xsd:key name="uniqueMakeid">
    <xsd:selector xpath=".//shoes/shoe/make"/>
    <xsd:field xpath="@makeid"/>
  </xsd:key>

  </xsd:element>
<!--  <xsd:attribute name="globalAtt" /> -->
</xsd:schema>