<?xml version="1.0" encoding="UTF-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://standards.ieee.org/downloads/1734/1734-2011"
	xmlns="http://standards.ieee.org/downloads/1734/1734-2011">

<!-- Elements -->
  <xs:element name="qipAnswer">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="assessment" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute ref="version"></xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="assessment">
    <xs:complexType>
    	<xs:sequence>
    		<xs:element ref="criterium" maxOccurs="unbounded" />
    	</xs:sequence>
    	<xs:attribute ref="id"></xs:attribute>
    </xs:complexType>
  </xs:element> 
  <xs:element name="criterium">
  	<xs:complexType>
  	  <xs:sequence maxOccurs="unbounded" minOccurs="1">
            <xs:element ref="answer" maxOccurs="1" minOccurs="1" />
            <xs:element ref="comment" maxOccurs="1" minOccurs="0"/>
  	  </xs:sequence>
  	  <xs:attribute ref="id"></xs:attribute>
  	</xs:complexType>
  </xs:element>
  <xs:element name="answer" type="answerType"></xs:element>
  <xs:element name="comment" type="commentType"></xs:element>

<!-- Attributes -->
  <xs:attribute name="version" type="xs:float"/>
  <xs:attribute name="id" type="idType"></xs:attribute>

<!-- Simple Types-->
  <xs:simpleType name="answerType">
    <xs:restriction base="xs:string">
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="commentType">
    <xs:restriction base="xs:string">
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="idType">
    <xs:restriction base="xs:int">
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
