<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <!-- Define the XML Schema of a node -->
  <xs:element name="catalog">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="resource" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="title" type="xs:string"/>
	          <xs:element name="reference" type="xs:string" minOccurs="0"/>
	          <xs:element name="sale_price" type="xs:float" minOccurs="0"/>
	          <xs:element name="purchase_price" type="xs:float" minOccurs="0"/>
	          <xs:element name="ean13" type="xs:string" minOccurs="0"/>
	          <xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="type" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

