<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<xsd:simpleType name="BindType">
		<xsd:restriction base="xsd:string" >
			<xsd:enumeration value="HLA" />
			<xsd:enumeration value="CTL" />
			<xsd:enumeration value="EXP" />
		</xsd:restriction>
	</xsd:simpleType>
	
	<xsd:complexType name="IntervalType">
		<xsd:attribute name="right" type="xsd:positiveInteger" use="required" />
		<xsd:attribute name="left" type="xsd:positiveInteger" use="required" />
		<xsd:attribute name="bindType" type="BindType" use="optional" />
    	<!-- <xsd:assert test="@right >= @left" /> -->
	</xsd:complexType>
	
	<xsd:complexType name="IntervalsListType">
		<xsd:sequence>
			<xsd:element name="interval" type="IntervalType" minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
	</xsd:complexType>
		
	<xsd:complexType name="AlleleType">
		<xsd:sequence>
			<xsd:element name="intervals" type="IntervalsListType" maxOccurs="1" />
		</xsd:sequence>
		<xsd:attribute name="code" type="xsd:string" use="required" />
	</xsd:complexType>
	
	<xsd:complexType name="ProteinType">
		<xsd:sequence>
			<xsd:element name="allele" type="AlleleType" minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
		<xsd:attribute name="name" type="xsd:string" use="required" />
	</xsd:complexType>
	
	<xsd:element name="protein" type="ProteinType" />
</xsd:schema>