<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- *****************************************************************************
	UniParc
	Version: 	$Revision: 1.4 $
	Date:		$Date: 2024/07/10 15:16:10 $
*******************************************************************************-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
           targetNamespace="http://uniprot.org/uniparc" xmlns="http://uniprot.org/uniparc">
  <xs:element name="uniparc">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="entry" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="copyright" type="xs:string"/>
      </xs:sequence>
      <xs:attribute name="checkpoint" type="xs:int" use="optional"/>
      <xs:attribute name="version" type="xs:string" use="optional"/>
    </xs:complexType>
  </xs:element>

  <xs:element name="entry">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="accession" type="xs:string" minOccurs="1" maxOccurs="1"/>
        <xs:element name="dbReference" type="dbReferenceType" minOccurs="1" maxOccurs="unbounded"/>
        <xs:element name="signatureSequenceMatch" type="seqFeatureType" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="sequence" minOccurs="1" maxOccurs="1"/>
      </xs:sequence>
      <xs:attribute name="dataset" type="xs:string" use="required"/>
      <xs:attribute name="UniProtKB_exclusion" type="xs:string"/>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="dbReferenceType">
    <xs:sequence>
      <xs:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="type" type="xs:string" use="required"/>
    <xs:attribute name="id" type="xs:string" use="required"/>
    <xs:attribute name="version_i" type="xs:int" use="required"/>
    <xs:attribute name="active" type="xs:string" use="required"/>
    <xs:attribute name="version" type="xs:int"/>
    <xs:attribute name="created" type="xs:date"/>
    <xs:attribute name="last" type="xs:date"/>
  </xs:complexType>

  <xs:complexType name="seqFeatureType">
    <xs:sequence>
      <xs:element name="ipr" type="seqFeatureGroupType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="lcn" type="locationType" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="database" type="xs:string" use="required"/>
    <xs:attribute name="id" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:element name="sequence">
    <xs:complexType mixed="true">
      <xs:attribute name="length" type="xs:int" use="required"/>
      <xs:attribute name="checksum" type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="propertyType">
    <xs:attribute name="type" type="xs:string" use="required"/>
    <xs:attribute name="value" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="locationType">
    <xs:attribute name="start" type="xs:int" use="required"/>
    <xs:attribute name="end" type="xs:int" use="required"/>
    <xs:attribute name="alignment" type="xs:string" use="optional"/>
  </xs:complexType>


  <xs:complexType name="seqFeatureGroupType">
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute name="id" type="xs:string" use="required"/>
  </xs:complexType>

</xs:schema>
