<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:lgicdb="http://www.pasteur.fr/recherche/banques/LGIC/"
            targetNamespace="http://www.pasteur.fr/recherche/banques/LGIC/">

 <xsd:annotation>
  <xsd:documentation xml:lang="en">

   This is the XML Schema describing the XML format of an entry from 
   the Ligand-Gated Ion Channel database.

   Level: 1
   Version: 7

   Authors:
    Nicolas Le Novère (lenov@ebi.ac.uk)
    Demouhi Marie-Ange Djite (madjite@ebi.ac.uk)
    Marco Donizelli (maleko@ebi.ac.uk)

   Date: Thu Oct 14 14:04:37 BST 2004

  </xsd:documentation>
 </xsd:annotation>

 <!--================================================================================-->
 <!--===== lgicdb ===================================================================-->
 <!--================================================================================-->

 <xsd:element name="lgicdb">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    The LGICdb entry root element. Currently it contains only the entry. We can
    imagine adding other type of info in the future (e.g. rendering or metadata).
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element ref="lgicdb:entry"/>
   </xsd:sequence>
   <xsd:attribute name="level" type="xsd:positiveInteger" use="required"/>
   <xsd:attribute name="version" type="xsd:positiveInteger" use="required"/>
  </xsd:complexType>
 </xsd:element>

 <!--================================================================================-->
 <!--===== entryGroup, entry ========================================================-->
 <!--================================================================================-->

 <xsd:group name="entryGroup">
  <xsd:all>
   <xsd:element ref="lgicdb:definition"/>
   <xsd:element ref="lgicdb:organism"/>
   <xsd:element ref="lgicdb:locus"/>
   <xsd:element ref="lgicdb:listOfBioSeqs"/>
   <xsd:element ref="lgicdb:listOfStructs"/>
   <xsd:element ref="lgicdb:listOfOtherIds"/>
   <xsd:element ref="lgicdb:listOfReferences"/>
   <xsd:element ref="lgicdb:notes"/>
  </xsd:all> 
 </xsd:group>

 <xsd:element name="entry">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    The LGICdb entry itself.
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:group ref="lgicdb:entryGroup"/>
   <xsd:attribute name="creation" type="xsd:dateTime" use="required"/>
   <xsd:attribute name="modification" type="xsd:dateTime" use="required"/>
   <xsd:attribute name="accession" type="xsd:string" use="required"/>
  </xsd:complexType>
 </xsd:element>

 <!--================================================================================-->
 <!--===== definition ===============================================================-->
 <!--================================================================================-->

 <xsd:element name="definition">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    The entry definition.
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType mixed="true"/>
 </xsd:element>

 <!--================================================================================-->
 <!--===== organism =================================================================-->
 <!--================================================================================-->

 <xsd:element name="organism">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    The name(genus, species) of the organism in which this subunit is founded.
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:attribute name="genus" type="xsd:string" use="required"/>
   <xsd:attribute name="species" type="xsd:string" use="required"/>
  </xsd:complexType>
 </xsd:element>

 <!--================================================================================-->
 <!--===== locus ====================================================================-->
 <!--================================================================================-->

 <xsd:element name="locus">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
     Locus: Chromosomal localisation of the gene which encodes this
     ligand-gated ion channel subunit. The map is a representation of
     the linear arrangement of genes a chromosome. For example Xp21
     means that the gene is at 21 cM from the centromere on the
     chromosome X's long arm.
    </xsd:documentation>
   </xsd:annotation>
  <xsd:complexType>
   <xsd:attribute name="chromosome" type="xsd:string" use="required"/>
   <xsd:attribute name="map" type="xsd:string" use="optional"/>
  </xsd:complexType>
 </xsd:element>

 <!--================================================================================-->
 <!--===== listOfBioSeqs, bioSeqGroup, bioSeq =======================================-->
 <!--================================================================================-->

 <xsd:element name="listOfBioSeqs">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    List of all biosequences.
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element ref="lgicdb:bioSeq" minOccurs="0" maxOccurs="unbounded"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>

 <xsd:group name="bioSeqGroup">
  <xsd:all>
   <xsd:element ref="lgicdb:listOfOtherIds"/>
   <xsd:element ref="lgicdb:listOfReferences"/>
   <xsd:element ref="lgicdb:notes"/>
   <xsd:element ref="lgicdb:sequence"/>
  </xsd:all> 
 </xsd:group>

 <xsd:element name="bioSeq">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    A biosequence can have three types. It can be protein, transcript or genomic.      
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:group ref="lgicdb:bioSeqGroup"/>   
   <xsd:attribute name="type" type="lgicdb:bioSeqType" use="required"/>
   <xsd:attribute name="label" type="xsd:string" use="optional"/>
  </xsd:complexType>
 </xsd:element>

 <xsd:simpleType name="bioSeqType">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    The set of biosequence types.
   </xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xsd:string">
   <xsd:enumeration value="protein"/>
   <xsd:enumeration value="transcript"/>
   <xsd:enumeration value="genomic"/>
  </xsd:restriction>
 </xsd:simpleType>

 <!--================================================================================-->
 <!--===== sequence =================================================================-->
 <!--================================================================================-->
	
 <xsd:element name="sequence">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    The sequence is a string of letters representing the amino-acids (protein)
    or the nucleotides (DNA).
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType mixed="true">
  </xsd:complexType>
 </xsd:element>

 <!--================================================================================-->
 <!--===== listOfStructs, structGroup, struct =======================================-->
 <!--================================================================================-->

 <xsd:element name="listOfStructs">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    List of files containing atomic coordinates of part or totality of the subunit. 
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element ref="lgicdb:struct" minOccurs="0" maxOccurs="unbounded"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>

 <xsd:group name="structGroup">
  <xsd:all>
   <xsd:element ref="lgicdb:listOfOtherIds"/>
   <xsd:element ref="lgicdb:listOfReferences"/>
   <xsd:element ref="lgicdb:notes"/>
  </xsd:all> 
 </xsd:group>

 <xsd:element name="struct">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    File containing atomic coordinates of part or totality of the subunit. 
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:group ref="lgicdb:structGroup"/>
   <xsd:attribute name="filename" type="xsd:string" use="optional"/>
  </xsd:complexType>
 </xsd:element>

 <!--================================================================================-->
 <!--===== listOfOtherIds, otherId, databaseType ====================================-->
 <!--================================================================================-->

 <xsd:element name="listOfOtherIds">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    List of other databases identifiers related to the content of the parent element
    (a subunit, a sequence, or a structure).
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element ref="lgicdb:otherId" minOccurs="0" maxOccurs="unbounded"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="otherId">
  <xsd:complexType>
   <xsd:attribute name="database" type="lgicdb:databaseType" use="required"/>
   <xsd:attribute name="accession" type="xsd:string" use="required"/>
  </xsd:complexType>
 </xsd:element>

 <xsd:simpleType name="databaseType">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    The set of database identifiers.
   </xsd:documentation>
  </xsd:annotation>
  <xsd:restriction base="xsd:string">
   <xsd:enumeration value="Ensembl"/>
   <xsd:enumeration value="UniProt"/>
   <xsd:enumeration value="DDBJ|EMBL|Genbank"/>
   <xsd:enumeration value="OMIM"/>
   <xsd:enumeration value="EMBL"/>
   <xsd:enumeration value="Genbank"/>
   <xsd:enumeration value="Gene Ontology"/>
   <xsd:enumeration value="InterPro"/>
   <xsd:enumeration value="Newt"/>
   <xsd:enumeration value="PDB"/>
   <xsd:enumeration value="Pfam"/>
   <xsd:enumeration value="SPTREMBL"/>
   <xsd:enumeration value="Swiss-Prot"/>
   <xsd:enumeration value="Taxonomy"/>	 
  </xsd:restriction>
 </xsd:simpleType>

 <!--================================================================================-->
 <!--===== listOfReferences, reference ==============================================-->
 <!--================================================================================-->

 <xsd:element name="listOfReferences">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    List of bibliographic references which document the content of the parent
    element (a subunit, a sequence or a structure).
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element ref="lgicdb:reference" minOccurs="0" maxOccurs="unbounded"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="reference">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    A bibliographic reference (article, book, URL, etc.).
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType mixed="true"/>
 </xsd:element>

 <!--================================================================================-->
 <!--===== notes ====================================================================-->
 <!--================================================================================-->

 <xsd:element name="notes">
  <xsd:annotation>
   <xsd:documentation xml:lang="en">
    Miscellaneous notes relative to the parent element.
   </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
   <xsd:sequence>
    <xsd:any namespace="http://www.w3.org/1999/xhtml"
             minOccurs="0" maxOccurs="unbounded"
             processContents="skip"/>
   </xsd:sequence> 
  </xsd:complexType>
 </xsd:element>

</xsd:schema>

