<?xml version="1.0" encoding="UTF-8"?>
<!--
{{Header}}

== Introduction ==

For better reading and editing this schema is divided into different sections:

* [[#Basic|Basic]]: Basic type definitions.
* [[#Source|Source]]: Type definitions for specifying the source of biological data.
* [[#Sequence|Sequence]]: Type definitions for sequence data
* [[#Structure|Structure]]: Type definitions for structure data.
* [[#Classification|Classification]]: Type definitions for classification schemes.
* [[#Pattern|Pattern]]: Type definitions for sequence patterns.
* [[#Alignment|Alignment]]: Type definitions for sequence alignments.

-->

<xs:schema 
  xmlns:bt="http://schemas.bioservices.net/2005/biotypes" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  xmlns="http://www.w3.org/1999/xhtml" 
  targetNamespace="http://schemas.bioservices.net/2005/biotypes"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"
  id="BioTypes" 
  version="1.0" 
  xml:lang="en"
>
   <xs:annotation>
      <xs:documentation>The BioTypes schema provides a common XML type framework for biological data in analogy to the predefined XML Schema types. The recommended prefix for the BioTypes namespace is <i>bt</i>. For further information on usage visit <a href="http://schemas.bioservices.net">BioSchemas </a>.
        <p>To use BioTypes in an XML schema download a local copy of the BioTypes schema and include it via the <code>import</code> statement:</p>
        <p>
          <code>
            <xs:import 
              schemaLocation="biotypes.xsd"
              namespace="http://schemas.bioservices.net/2005/biotypes"
            />
          </code>
        </p>
        <p>Content is available under <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Attribution-ShareAlike License</a>.</p>
      </xs:documentation>
      <xs:appinfo source="biotypes/tests/tests.xsd"/>
      <xs:appinfo>
        <bt:source uri="urn:">
          <bt:mapping to="url" />
          <bt:mapping to="caption"><bt:attribute name="source"/></bt:mapping>
        </bt:source>
        <bt:source uri="urn:lsid:">
          <bt:mapping to="url">lsidres:<bt:attribute name="source"/></bt:mapping>
          <bt:mapping to="caption"><bt:attribute name="source"/></bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:embl">
          <bt:mapping to="caption">EMBL Nucleotide Sequence Database</bt:mapping>
          <bt:mapping to="url">http://www.ebi.ac.uk/embl/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:entrez">
          <bt:mapping to="caption">NCBI Entrez Gene</bt:mapping>
          <bt:mapping to="url">http://www.ncbi.nih.gov/entrez/query.fcgi?db=gene</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:genbank">
          <bt:mapping to="caption">NCBI GenBank</bt:mapping>
          <bt:mapping to="url">http://www.ncbi.nlm.nih.gov/Genbank/</bt:mapping>
        </bt:source>              
        <bt:source uri="urn:bts:hugo">
          <bt:mapping to="caption">The Human Genome Organisation</bt:mapping>
          <bt:mapping to="url">http://www.hugo-international.org/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:locuslink">
          <bt:mapping to="caption">NCBI LocusLink</bt:mapping>
          <bt:mapping to="url">http://www.ncbi.nlm.nih.gov/projects/LocusLink/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:mgd">
          <bt:mapping to="caption">Mouse Genome Informatics</bt:mapping>
          <bt:mapping to="url">http://www.informatics.jax.org/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:mgi">
          <bt:mapping to="caption">Mouse Genome Informatics</bt:mapping>
          <bt:mapping to="url">http://www.informatics.jax.org/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:rgd">
          <bt:mapping to="caption">Rat Genome Database</bt:mapping>
          <bt:mapping to="url">http://rgd.mcw.edu/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:sgd">
          <bt:mapping to="caption">Saccharomyces Genome Database</bt:mapping>
          <bt:mapping to="url">http://www.yeastgenome.org/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:pdb">
          <bt:mapping to="caption">RCSB Protein Data Bank</bt:mapping>
          <bt:mapping to="url">http://www.rcsb.org/pdb/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:swissprot">
          <bt:mapping to="caption">Swiss-Prot</bt:mapping>
          <bt:mapping to="url">http://au.expasy.org/sprot/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:dssp">
          <bt:mapping to="caption">DSSP</bt:mapping>
          <bt:mapping to="url">http://www.cmbi.kun.nl/gv/dssp/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:pdb">
          <bt:mapping to="caption">RCSB Protein Data Bank</bt:mapping>
          <bt:mapping to="url">http://www.rcsb.org/pdb/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:pdb">
         <bt:mapping to="caption">RCSB Protein Data Bank</bt:mapping>
         <bt:mapping to="url">http://www.rcsb.org/pdb/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:cath">
          <bt:mapping to="caption">CATH</bt:mapping>
          <bt:mapping to="url">http://www.ccbb.re.kr/irs/2_cath/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:scop">
          <bt:mapping to="caption">SCOP</bt:mapping>
          <bt:mapping to="url">http://scop.mrc-lmb.cam.ac.uk/scop/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:interpro">
          <bt:mapping to="caption">EMBL Interpro</bt:mapping>
          <bt:mapping to="url">http://www.ebi.ac.uk/interpro/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:pfam">
          <bt:mapping to="caption">PFAM</bt:mapping>
          <bt:mapping to="url">http://www.sanger.ac.uk/Software/Pfam/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:prodom">
          <bt:mapping to="caption">ProDom</bt:mapping>
          <bt:mapping to="url">http://protein.toulouse.inra.fr/prodom/current/html/home.php</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:prosite">
          <bt:mapping to="caption">ExPASy PROSITE</bt:mapping>
          <bt:mapping to="url">http://au.expasy.org/prosite/</bt:mapping>
        </bt:source>
        <bt:source uri="urn:bts:clustalw">
          <bt:mapping to="caption">ClustalW</bt:mapping>
          <bt:mapping to="url">http://www.ebi.ac.uk/clustalw/</bt:mapping>
        </bt:source>
      </xs:appinfo>
   </xs:annotation>
   
<!--
'''references'''

* [http://schemas.bioservices.net/2005/biotypes BioTypes namespace URL]

'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

<!--
== Basic ==

This section contains basic type definitions.
-->

  <xs:simpleType name="index">
    <xs:annotation>
      <xs:documentation>An one-based index. Indices should begin with 1 because zero-based indices might be confusing for humans and are a common source for errors, e.g. when a user assumes the numeration begins with 1.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestIndex.xml"/>
    </xs:annotation>
    <xs:restriction base="xs:positiveInteger"/>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="version">
    <xs:annotation>
      <xs:documentation>A versioning number.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestVersion.xml"/>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:pattern value="\d+(\.\d+)*"/>
    </xs:restriction>
  </xs:simpleType> 

<!--
'''change log'''

* 05/18/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="score">
    <xs:annotation>
      <xs:documentation>A scoring value. Scores can be positive or negative.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:double"/>
  </xs:simpleType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

	<xs:complexType name="anyContent" mixed="true" abstract="true">
    <xs:annotation>
      <xs:documentation>Allows any mixed content, i.e. text and elements from any namespace.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestContainer.xml"/>
    </xs:annotation>
    <xs:sequence  minOccurs="0" maxOccurs="unbounded">
      <xs:any namespace="##any" processContents="lax"/>
    </xs:sequence>
	</xs:complexType>
	
<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:attributeGroup name="dataAttrs">
    <xs:annotation>
      <xs:documentation>The attributes for a data item. A data item is an element which holds data that should be regarded as a single unit in contrast to a data collection which holds multiple units of data, i.e. data items. In addition to the optional <code>version</code> and <code>date</code> attributes, specifying the version of the data source and the date (and eventually the time) the data item was retrieved, a data item should declare a <code>source</code> attribute of type <code>sourceUri</code> and a <code>accNumber</code> attribute of type <code>accessionNumber</code>, specifying the data source of the data item and its accession number within the data source.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="version" type="bt:version" use="optional" />
    <xs:attribute name="date" use="optional">
      <xs:simpleType>
        <xs:union memberTypes="xs:date xs:dateTime"/>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>

<!--
'''references'''

* [[#simpleType_sourceUri|simpleType sourceUri]]
* [[#simpleType_accessionNumber|simpleType accessionNumber]]

'''change log'''

* 05/10/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   
	
	<xs:attributeGroup name="scopeAttrs">
    <xs:annotation>
      <xs:documentation>Attributes for setting a range. <code>from</code> should be less than <code>to</code>.</xs:documentation>
    </xs:annotation>
		<xs:attribute name="from" type="bt:index" use="required" />
		<xs:attribute name="to" type="bt:index" use="required" />
	</xs:attributeGroup>
	
<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   
	

<!--
== Source ==

This section contains type declarations for specifying the source of biological data.
-->

   <xs:simpleType name="lsid">
      <xs:annotation>
         <xs:documentation>A Life Sciences Identifier (LSID) is a URN that uniquely names an object. According to the <a href="http://lsid.sourceforge.net/">LSID Resolution Protocol Project</a> the syntax is <code>urn:lsid:&lt;authority&gt;:&lt;namespace&gt;:&lt;value&gt;:&lt;version&gt;</code> where <code>authority</code> is the name of the organization that has defined an entity, <code>namespace</code> is a namespace within the authority for the Id, <code>value</code> is an alpha-numeric sequence that uniquely identifies an object to its authority, and <code>version</code> is an optional version number for an Id. <code>authority</code> and <code>namespace</code> can have hierarchical path elements separated by "/".</xs:documentation>
         <xs:appinfo source="biotypes/tests/TestLSID.xml"/>
      </xs:annotation>
        <xs:restriction base="xs:anyURI">
             <xs:pattern value="urn:lsid:(\c|/)+:(\c|/)+:\c+(:\c+)?"/>
        </xs:restriction>
   </xs:simpleType>
   
<!--
'''references'''
* [http://lsid.sourceforge.net LSID Resolution Protocol Project]
-->   
<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

   <xs:simpleType name="sourceUri" final="restriction">
      <xs:annotation>
         <xs:documentation>The URI of a data source - may be a LSID.</xs:documentation>
      </xs:annotation>
        <xs:union memberTypes="bt:lsid">
             <xs:simpleType>
               <xs:restriction base="xs:anyURI">
                 <xs:minLength value="1"/>
               </xs:restriction>
             </xs:simpleType>
        </xs:union>
   </xs:simpleType>
   
<!--
'''references'''
* [[#simpleType_lsid|simpleType lsid]]
* [[#complexType_source|complexType source]]
* [http://lsid.sourceforge.net LSID Resolution Protocol Project]
-->   

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
	
	<xs:simpleType name="accessionNumber">
    <xs:annotation>
      <xs:documentation>Specifies the accession number of a data item relative to its data source. The format of the accession number depends on the data source.</xs:documentation>
    </xs:annotation>
		<xs:restriction base="xs:token">
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>

<!--
'''references'''
* [[#complexType_source|complexType source]]

'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

	<xs:complexType name="source" mixed="true">
    <xs:annotation>
      <xs:documentation>The description of a data source. The data source is identified by the <code>uri</code> attribute. The content may be source specific. It may consist e.g. of one or more <code>mapping</code> elements which map the source URI to an URL or a caption. Such a mapping is demonstrated by the <a href="http://schemas.bioservices.net/index.php?title=BioTypes_stylesheet">BioTypes stylesheet</a>.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="bt:anyContent">
        <xs:attribute name="uri" type="bt:sourceUri" use="required" form="unqualified"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

<!--
'''references'''
* [[#element_source|element source]]
* [[#element_mapping|element mapping]]
* [[BioTypes stylesheet]]

'''change log'''

* 05/10/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:element name="source">
    <xs:annotation>
      <xs:documentation>The description of a data source.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="bt:source">
          <xs:anyAttribute namespace="##other" processContents="lax"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

<!--
'''references'''

* [[#complexType_source|complexType source]]

'''change log'''

* 05/19/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:element name="mapping">
    <xs:annotation>
      <xs:documentation>The mapping of a value to another representation. The <code>to</code> attribute specifies the representation. A mapping is used e.g. within a <code>source</code> element to map the data source URI to an URL. It is used by the <a href="http://schemas.bioservices.net/index.php?title=BioTypes_stylesheet">BioTypes stylesheet</a>. Its content may be mapping specific, e.g. text and one or more <code>attribute</code> elements. For each subordinated element the processing application or stylesheet should be ready to process it, i.e. there must be appropiate template.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="bt:anyContent">
          <xs:attribute name="to" use="required">
            <xs:simpleType>
              <xs:union memberTypes="xs:token">
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="url"/>
                    <xs:enumeration value="caption"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:union>
            </xs:simpleType>
          </xs:attribute>
          <xs:anyAttribute namespace="##other" processContents="lax" />
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

<!--
'''references'''

* [[BioTypes stylesheet]]

'''change log'''

* 05/19/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->	

  <xs:element name="attribute">
    <xs:annotation>
      <xs:documentation>Evaluates an attribute. This element can be used e.g. inside a <code>mapping</code> element. During the mapping process it should be replaced by the concrete value of the attribute.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="name" type="xs:Name" use="required"/>
      <xs:attribute name="namespace" type="xs:anyURI" use="optional" />
      <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
  </xs:element>

<!--
'''change log'''

* 05/19/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->	

<!--
== Sequence ==

This section contains type declarations for biological sequence data.
-->

  <xs:simpleType name="sequence">
    <xs:annotation>
      <xs:documentation>A sequence of character data of length greater than zero.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestSequence.xml"/>
    </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:whiteSpace value="preserve"/>
  </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
    
  <xs:simpleType name="gappedAmbiguousNucleotideSequence">
    <xs:annotation>
      <xs:documentation>A sequence of nucleotides (RNA and DNA) or its placeholders in upper case letters and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestGappedAmbiguousNucleotideSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:sequence">
      <xs:pattern value="(A|G|C|T|U|R|Y|M|K|S|W|H|B|V|D|N|X|\-)+"/>
      <xs:whiteSpace value="collapse"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="gappedNucleotideSequence">
    <xs:annotation>
      <xs:documentation>A sequence of nucleotides (RNA and DNA) in upper case letters and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestGappedNucleotideSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousNucleotideSequence">
      <xs:pattern value="(A|G|C|T|U|\-)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="ambiguousNucleotideSequence">
    <xs:annotation>
      <xs:documentation>A sequence of nucleotides (RNA and DNA) or its placeholders in upper case letters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestAmbiguousNucleotideSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousNucleotideSequence">
      <xs:pattern value="(A|G|C|T|U|R|Y|M|K|S|W|H|B|V|D|N|X)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="nucleotideSequence">
    <xs:annotation>
      <xs:documentation>A sequence of nucleotides (RNA and DNA) in upper case letters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestNucleotideSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:ambiguousNucleotideSequence">
      <xs:pattern value="(A|G|C|T|U)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

   <xs:simpleType name="nucleotideSequenceSources">
      <xs:annotation>
         <xs:documentation>A list of predefined nucleotide sequence source names.</xs:documentation>
      </xs:annotation>
        <xs:restriction base="xs:token">
             <xs:enumeration value="urn:bts:embl"/>
             <xs:enumeration value="urn:bts:entrez"/>
             <xs:enumeration value="urn:bts:genbank"/>
             <xs:enumeration value="urn:bts:hugo"/>
             <xs:enumeration value="urn:bts:locuslink"/>
             <xs:enumeration value="urn:bts:mgd"/>
             <xs:enumeration value="urn:bts:mgi"/>
             <xs:enumeration value="urn:bts:rgd"/>
             <xs:enumeration value="urn:bts:sgd"/>
        </xs:restriction>
   </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="nucleotideSequenceSource">
    <xs:annotation>
      <xs:documentation>The source of a nucleotide sequence. May be an URI, a LSID or one of the predefined source names.</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="bt:sourceUri bt:nucleotideSequenceSources"/>
  </xs:simpleType>
    
<!--
'''references'''
* [[#simpleType_nucleotideSequenceSources|simpleType nucleotideSequenceSources]]
-->
<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:attributeGroup name="nucleotideSequenceAttrs">
    <xs:annotation>
      <xs:documentation>Attributes for nucleotide sequences. <code>source</code> specifies the source of the sequence. In addition <code>accNumber</code> can be set to an accession number dependant on the data source if <code>source</code> identifies only the data source (e.g. database) but not the data item itself.</xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="bt:dataAttrs"/>
    <xs:attribute name="accNumber" type="bt:accessionNumber" use="optional"/>
    <xs:attribute name="source" type="bt:nucleotideSequenceSource" use="optional" />
  </xs:attributeGroup>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   
    
  <xs:simpleType name="gappedAmbiguousDnaSequence">
    <xs:annotation>
      <xs:documentation>A sequence of DNAs or its placeholders in upper case letters and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestGappedAmbiguousDnaSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousNucleotideSequence">
      <xs:pattern value="(A|G|C|T|R|Y|M|K|S|W|H|B|V|D|N|X|\-)+"/>
      <xs:whiteSpace value="collapse"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="gappedDnaSequence">
    <xs:annotation>
      <xs:documentation>A sequence of DNAs in upper case letters and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestGappedDnaSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousDnaSequence">
      <xs:pattern value="(A|G|C|T|\-)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="ambiguousDnaSequence">
    <xs:annotation>
      <xs:documentation>A sequence of DNAs or its placeholders in upper case letters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestAmbiguousDnaSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousDnaSequence">
      <xs:pattern value="(A|G|C|T|R|Y|M|K|S|W|H|B|V|D|N|X)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="dnaSequence">
    <xs:annotation>
      <xs:documentation>A sequence of DNAs in upper case letters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestDnaSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:ambiguousDnaSequence">
      <xs:pattern value="(A|G|C|T)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
    
  <xs:simpleType name="gappedAmbiguousRnaSequence">
    <xs:annotation>
      <xs:documentation>A sequence of RNAs or its placeholders in upper case letters and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestGappedAmbiguousRnaSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousNucleotideSequence">
      <xs:pattern value="(A|G|C|U|R|Y|M|K|S|W|H|B|V|D|N|X|\-)+"/>
      <xs:whiteSpace value="collapse"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="gappedRnaSequence">
    <xs:annotation>
      <xs:documentation>A sequence of DNAs in upper case letters and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestGappedRnaSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousRnaSequence">
      <xs:pattern value="(A|G|C|U|\-)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="ambiguousRnaSequence">
    <xs:annotation>
      <xs:documentation>A sequence of RNAs or its placeholders in upper case letters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestAmbiguousRnaSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousRnaSequence">
      <xs:pattern value="(A|G|C|U|R|Y|M|K|S|W|H|B|V|D|N|X)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="rnaSequence">
    <xs:annotation>
      <xs:documentation>A sequence of RNAs in upper case letters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestRnaSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:ambiguousRnaSequence">
      <xs:pattern value="(A|G|C|U)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="gappedAmbiguousTerminalAminoAcidOneLetterSequence">
    <xs:annotation>
      <xs:documentation>A sequence of amino acids in upper case one letter code including the terminal symbol *, ambigiuous and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="bt:sequence">
      <xs:pattern value="(A|R|N|D|C|Q|E|G|H|I|L|K|M|F|P|S|T|U|W|Y|V|X|B|Z|\-|\*)+"/>
      <xs:whiteSpace value="collapse"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="gappedAmbiguousAminoAcidOneLetterSequence">
    <xs:annotation>
      <xs:documentation>A sequence of amino acids in upper case one letter code, ambigiuous and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousTerminalAminoAcidOneLetterSequence">
      <xs:pattern value="(A|R|N|D|C|Q|E|G|H|I|L|K|M|F|P|S|T|U|W|Y|V|X|B|Z|\-)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/10/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="ambiguousAminoAcidOneLetterSequence">
    <xs:annotation>
      <xs:documentation>A sequence of amino acids in upper case one letter code and ambigiuous characters. Only leading and trailing whitespace is allowed.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousTerminalAminoAcidOneLetterSequence">
      <xs:pattern value="(A|R|N|D|C|Q|E|G|H|I|L|K|M|F|P|S|T|U|W|Y|V|X|B|Z)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="gappedAminoAcidOneLetterSequence">
    <xs:annotation>
      <xs:documentation>A sequence of amino acids in upper case one letter code and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousTerminalAminoAcidOneLetterSequence">
      <xs:pattern value="(A|R|N|D|C|Q|E|G|H|I|L|K|M|F|P|S|T|U|W|Y|V|\-)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="terminalAminoAcidOneLetterSequence">
    <xs:annotation>
      <xs:documentation>A sequence of amino acids in upper case one letter code including the terminal symbol *. Only leading and trailing whitespace is allowed.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousTerminalAminoAcidOneLetterSequence">
      <xs:pattern value="(A|R|N|D|C|Q|E|G|H|I|L|K|M|F|P|S|T|U|W|Y|V|\*)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="aminoAcidOneLetterSequence">
    <xs:annotation>
      <xs:documentation>A sequence of amino acids in upper case one letter code. Only leading and trailing whitespace is allowed.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="bt:ambiguousAminoAcidOneLetterSequence">
      <xs:pattern value="(A|R|N|D|C|Q|E|G|H|I|L|K|M|F|P|S|T|U|W|Y|V)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="terminalAminoAcidThreeLetterSequence">
    <xs:annotation>
      <xs:documentation>A sequence of amino acids in upper case three letter code including the terminal symbol TER. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestTerminalAminoAcidThreeLetterSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:sequence">
       <xs:pattern value="(ALA|ARG|ASN|ASP|CYS|GLN|GLU|GLY|HIS|ILE|LEU|LYS|MET|PHE|PRO|SER|THR|SEC|TRP|TYR|VAL|TER)+"/>
      <xs:whiteSpace value="collapse"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="aminoAcidThreeLetterSequence">
    <xs:annotation>
      <xs:documentation>A sequence of amino acids in upper case three letter code. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestAminoAcidThreeLetterSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:terminalAminoAcidThreeLetterSequence">
       <xs:pattern value="(ALA|ARG|ASN|ASP|CYS|GLN|GLU|GLY|HIS|ILE|LEU|LYS|MET|PHE|PRO|SER|THR|SEC|TRP|TYR|VAL)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

   <xs:simpleType name="aminoAcidSequenceSources">
      <xs:annotation>
         <xs:documentation>A list of predefined amino acid sequence source names.</xs:documentation>
      </xs:annotation>
        <xs:restriction base="xs:token">
             <xs:enumeration value="urn:bts:pdb"/>
             <xs:enumeration value="urn:bts:swissprot"/>
        </xs:restriction>
   </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="aminoAcidSequenceSource">
    <xs:annotation>
      <xs:documentation>The source of a amino acid sequence. May be an URI, a LSID or one of the predefined source names.</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="bt:sourceUri bt:aminoAcidSequenceSources"/>
  </xs:simpleType>
    
<!--
'''references'''
* [[#simpleType_aminoAcidSequenceSources|simpleType aminoAcidSequenceSources]]
-->
<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:attributeGroup name="aminoAcidSequenceAttrs">
    <xs:annotation>
      <xs:documentation>Attributes for amino acid sequences. <code>source</code> specifies the source of the sequence. In addition <code>accNumber</code> can be set to an accession number dependant on the data source if <code>source</code> identifies only the data source (e.g. database) but not the data item itself.</xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="bt:dataAttrs"/>
    <xs:attribute name="accNumber" type="bt:accessionNumber" use="optional"/>
    <xs:attribute name="source" type="bt:aminoAcidSequenceSource" use="optional" />
  </xs:attributeGroup>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="gappedAmbiguousSecondaryStructureSequence">
    <xs:annotation>
      <xs:documentation>A sequence of secondary structure assignments or its placeholder in upper case letters and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestGappedAmbiguousSecondaryStructureSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:sequence">
       <xs:pattern value="(C|H|G|I|E|B|T|S|_|X|\-)+"/>
       <xs:whiteSpace value="replace"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="ambiguousSecondaryStructureSequence">
    <xs:annotation>
      <xs:documentation>A sequence of secondary structure assignments or its placeholder in upper case letters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestAmbiguousSecondaryStructureSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousSecondaryStructureSequence">
       <xs:pattern value="(C|H|G|I|E|B|T|S|_|X)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="gappedSecondaryStructureSequence">
    <xs:annotation>
      <xs:documentation>A sequence of secondary structure assignments in upper case letters and gap characters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestGappedSecondaryStructureSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousSecondaryStructureSequence">
       <xs:pattern value="(C|H|G|I|E|B|T|S|_|\-)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="secondaryStructureSequence">
    <xs:annotation>
      <xs:documentation>A sequence of secondary structure assignments in upper case letters. Only leading and trailing whitespace is allowed.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestSecondaryStructureSequence.xml"/>
    </xs:annotation>
    <xs:restriction base="bt:gappedAmbiguousSecondaryStructureSequence">
       <xs:pattern value="(C|H|G|I|E|B|T|S|_)+"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

   <xs:simpleType name="secondaryStructureSequenceSources">
      <xs:annotation>
         <xs:documentation>A list of predefined secondary structure sequence source names.</xs:documentation>
      </xs:annotation>
        <xs:restriction base="xs:token">
             <xs:enumeration value="urn:bts:dssp"/>
             <xs:enumeration value="urn:bts:pdb"/>
        </xs:restriction>
   </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="secondaryStructureSequenceSource">
    <xs:annotation>
      <xs:documentation>The source of a secondary structure sequence. May be an URI, a LSID or one of the predefined source names.</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="bt:sourceUri bt:secondaryStructureSequenceSources"/>
  </xs:simpleType>
    
<!--
'''references'''
* [[#simpleType_secondaryStructureSequenceSources|simpleType secondaryStructureSequenceSources]]
-->
<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:attributeGroup name="secondaryStructureSequenceAttrs">
    <xs:annotation>
      <xs:documentation>Attributes for secondary structure sequences. <code>source</code> specifies the source of the sequence. In addition <code>accNumber</code> can be set to an accession number dependant on the data source if <code>source</code> identifies only the data source (e.g. database) but not the data item itself.</xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="bt:dataAttrs"/>
    <xs:attribute name="accNumber" type="bt:accessionNumber" use="optional"/>
    <xs:attribute name="source" type="bt:secondaryStructureSequenceSource" use="optional" />
  </xs:attributeGroup>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

<!--
== Structure ==
  
This section contains type, attribute and element declarations for atom structures.
-->
  
  <xs:simpleType name="atomNames">
    <xs:annotation>
      <xs:documentation>A list of predefined atom names. <p>This list contains the following atom names:</p>
        <ul>
          <li><code>H</code>: hydrogen atom</li>
          <li><code>C</code>: carbon atom</li>
          <li><code>CA</code>: alpha carbon atom</li>
          <li><code>CB</code>: beta carbon atom</li>
          <li><code>O</code>: oxygen atom</li>
          <li><code>N</code>: nitrogen atom</li>
          <li><code>S</code>: sulphur atom</li>
        </ul>
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">      
      <xs:enumeration value="H"/>
      <xs:enumeration value="C"/>
      <xs:enumeration value="CA"/>
      <xs:enumeration value="CB"/>
      <xs:enumeration value="O"/>
      <xs:enumeration value="N"/>
      <xs:enumeration value="S"/>
    </xs:restriction>
  </xs:simpleType>
<!--
'''references'''
* [[#simpleType_atomName|simpleType atomName]]
-->
<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="atomName">
    <xs:annotation>
      <xs:documentation>The (abbreviated) name of an atom within a biological molecule. The name must be at least one character long and may contain numbers but not at the beginning.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestAtomName.xml"/>
    </xs:annotation>
    <xs:union memberTypes="bt:atomNames">
      <xs:simpleType>
        <xs:restriction base="xs:token">
             <xs:minLength value="1"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
<!--
'''references'''
* [[#simpleType_atomNames|simpleType atomNames]]
-->
<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="coordinate">
    <xs:annotation>
      <xs:documentation>A coordinate in a n-dimensional space.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:double"/>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="distance">
    <xs:annotation>
      <xs:documentation>A distance in a n-dimensional space. A distance may not be negative.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:double">
      <xs:minInclusive value="0.0"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="distanceUnits">
    <xs:annotation>
      <xs:documentation>A list of possible distance units. <p>This list contains the following entries:</p>
      <ul>
        <li><code>angstroem</code>: Angstroem</li>
      </ul></xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="angstroem"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="atomStructureSources">
    <xs:annotation>
       <xs:documentation>A list of predefined atom structure source names.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
         <xs:enumeration value="urn:bts:pdb"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="atomStructureSource">
    <xs:annotation>
      <xs:documentation>The source of an atom structure. May be an URI, a LSID or one of the predefined source names.</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="bt:sourceUri bt:atomStructureSources"/>
  </xs:simpleType>
    
<!--
'''references'''
* [[#simpleType_atomSequenceSources|simpleType atomSequenceSources]]
-->
<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->


  <xs:attributeGroup name="coordinates3D">
    <xs:annotation>
      <xs:documentation>Coordinates in a 3-dimensional space.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestCoordinates3D.xml"/>
    </xs:annotation>
    <xs:attribute name="x" type="bt:coordinate" use="required" form="unqualified"/>
    <xs:attribute name="y" type="bt:coordinate" use="required" form="unqualified"/>
    <xs:attribute name="z" type="bt:coordinate" use="required" form="unqualified"/>
  </xs:attributeGroup>

<!--
'''change log'''

* 04/26/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:complexType name="atom" block="restriction" final="restriction">
    <xs:annotation>
      <xs:documentation>A single atom including its coordinates in 3-dimensional space and its type.</xs:documentation>
      <xs:appinfo source="biotypes/tests/TestAtom.xml"/>
    </xs:annotation>
    <xs:attributeGroup ref="bt:coordinates3D"/>
    <xs:attribute name="type" type="bt:atomName" use="required" form="unqualified"/>
  </xs:complexType>

<!--
'''references'''
* [[#attributeGroup_coordinates3D|attributeGroup coordinates3D]]
-->

<!--
'''change log'''

* 04/26/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:element name="abstractAtom" type="bt:atom" abstract="true" block="restriction" final="restriction">
    <xs:annotation>
      <xs:documentation>An abstract atom element for the atomSeq element.</xs:documentation>
    </xs:annotation>
  </xs:element>

<!--
'''references'''
* [[#complexType_atom|complexType atom]]
* [[#complexType_atomSeq|complexType atomSeq]]
-->

<!--
'''change log'''

* 04/26/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:attributeGroup name="structureAttrs">
    <xs:annotation>
      <xs:documentation>Attributes for structure data. <code>source</code> specifies the source of the structure data. In addition <code>accNumber</code> can be set to an accession number dependant on the data source if <code>source</code> identifies only the data source (e.g. database) but not the data item itself.</xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="bt:dataAttrs"/>
    <xs:attribute name="accNumber" type="bt:accessionNumber" use="optional"/>
    <xs:attribute name="source" type="bt:atomStructureSource" use="optional" />
  </xs:attributeGroup>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:complexType name="atomSequence" block="restriction" final="restriction">
    <xs:annotation>
      <xs:documentation>A sequence of atoms. An atom sequence must contain at least one atom. The <code>abstractAtom</code> element must be replaced by a concrete element of type <code>atom</code>. This is done via a substitution group:
        <p><code><xs:element name="atom" type="bt:atom" substitutionGroup="bt:abstractAtom"/></code>.</p>
        <p>The coordinates of each atom are relative to the specified distance unit (default is Angstroem).</p></xs:documentation>
      <xs:appinfo source="biotypes/tests/TestAtomSeq.xml"/>
    </xs:annotation>
    <xs:sequence>
      <xs:element ref="bt:abstractAtom" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="bt:structureAttrs"/>
    <xs:attribute name="unit" type="bt:distanceUnits" use="optional" default="angstroem"/>
  </xs:complexType>

<!--
'''references'''
* [[#complexType_atom|complexType atom]]
* [[#element_atom|element atom]]
-->

<!--
'''change log'''

* 04/26/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:complexType name="atomConnection" abstract="true" block="restriction" final="restriction">
    <xs:annotation>
      <xs:documentation>Specifies a connection between two atoms identified by <code>atomType1</code> and <code>atomType2</code>. A connection can be e.g. a bond or a contact.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="atomType1" type="bt:atomName" use="required" />
    <xs:attribute name="atomType2" type="bt:atomName" use="required" />
  </xs:complexType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:complexType name="atomContact">
    <xs:annotation>
      <xs:documentation>Specifies a (close) contact between two atoms. The distance of the two atoms is specified by <code>distance</code>. The unit of the distance depends on <code>unit</code>. The default setting for <code>unit</code> is <code>angstroem</code>.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="bt:atomConnection">
        <xs:attribute name="distance" type="bt:distance" use="required" />
        <xs:attribute name="unit" type="bt:distanceUnits" use="optional" default="angstroem"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   
		  	
<!--
== Classification ==

This section contains type declaration for the classification of biological objects.
-->

   <xs:simpleType name="classificationSources">
      <xs:annotation>
         <xs:documentation>A list of predefined classification source names.</xs:documentation>
      </xs:annotation>
        <xs:restriction base="xs:token">
             <xs:enumeration value="urn:bts:cath"/>
             <xs:enumeration value="urn:bts:scop"/>
        </xs:restriction>
   </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="classificationSource">
    <xs:annotation>
      <xs:documentation>The source of a classification. May be an URI, a LSID or one of the predefined source names.</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="bt:sourceUri bt:classificationSources"/>
  </xs:simpleType>
    
<!--
'''references'''
* [[#simpleType_classificationSources|simpleType classificationSources]]
-->
<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:simpleType name="classificationValue">
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   
	
	<xs:complexType name="classification">
    <xs:annotation>
      <xs:documentation>Specifies a classification. The classification scheme is identified by <code>source</code>. The classification itself is specified by <code>accNumber</code>.</xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="bt:dataAttrs"/>
    <xs:attribute name="source" type="bt:classificationSource" use="required"/>
    <xs:attribute name="accNumber" type="bt:classificationValue" use="required"/>
  </xs:complexType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   
	
<!--
== Pattern ==

This section contains type declaration for sequence patterns.
-->

   <xs:simpleType name="patternSources">
      <xs:annotation>
         <xs:documentation>A list of predefined sequence pattern source names.</xs:documentation>
      </xs:annotation>
        <xs:restriction base="xs:token">
             <xs:enumeration value="urn:bts:interpro"/>
             <xs:enumeration value="urn:bts:pfam"/>
             <xs:enumeration value="urn:bts:prodom"/>
             <xs:enumeration value="urn:bts:prosite"/>
        </xs:restriction>
   </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="patternSource">
    <xs:annotation>
      <xs:documentation>The source of a sequence pattern. May be an URI, a LSID or one of the predefined source names.</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="bt:sourceUri bt:patternSources"/>
  </xs:simpleType>
    
<!--
'''references'''
* [[#simpleType_patternSources|simpleType patternSources]]
-->
<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:attributeGroup name="patternAttrs">
    <xs:annotation>
      <xs:documentation>Attributes for pattern data. <code>source</code> specifies the source of the pattern data. In addition <code>accNumber</code> can be set to an accession number dependant on the data source if <code>source</code> identifies only the data source (e.g. database) but not the data item itself.</xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="bt:dataAttrs"/>
    <xs:attribute name="source" type="bt:patternSource" use="required"/>
    <xs:attribute name="accNumber" type="bt:accessionNumber" use="required"/>
  </xs:attributeGroup>

<!--
'''change log'''

* 05/19/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

	<xs:complexType name="patternBase" mixed="true">
    <xs:annotation>
      <xs:documentation>A sequence pattern. The content of a pattern element is the pattern itself, e.g. a consensus sequence or a HMM, and may contain elements from any namespace and text.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="bt:anyContent">
        <xs:attributeGroup ref="bt:patternAttrs"/>
      </xs:extension>
    </xs:complexContent>
	</xs:complexType>  

<!--
'''change log'''

* 05/19/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

	<xs:complexType name="patternProfile">
    <xs:annotation>
      <xs:documentation>A sequence pattern profile. A profile must contain at least one pattern reference.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element ref="bt:abstractPatternProfileMember" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="bt:dataAttrs"/>
    <xs:attribute name="source" type="bt:patternSource" use="optional" />
    <xs:attribute name="accNumber" type="bt:accessionNumber" use="optional"/>
	</xs:complexType>

<!--
'''change log'''

* 05/19/05 by [http://szugat.gmxhome.de Martin Szugat]: Made pattern abstract.
* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:complexType name="patternProfileMember" block="restriction" final="restriction">
    <xs:annotation>
      <xs:documentation>A member of a pattern profile. The number of occurences of the pattern in the sequence(s) must be specified.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="bt:patternBase">
        <xs:attribute name="occurence" type="xs:positiveInteger" use="required"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

<!--
'''change log'''

* 05/19/05 by [http://szugat.gmxhome.de Martin Szugat]: Made pattern abstract.
* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   
	
  <xs:element name="abstractPatternProfileMember" type="bt:patternProfileMember" abstract="true" block="restriction" final="restriction">
    <xs:annotation>
      <xs:documentation>Abstract pattern element for a pattern profile.</xs:documentation>
    </xs:annotation>
  </xs:element>

<!--
'''change log'''

* 05/19/05 by [http://szugat.gmxhome.de Martin Szugat]: Made pattern abstract.
* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   
	
	<xs:complexType name="pattern" mixed="true">
    <xs:annotation>
      <xs:documentation>A single sequence pattern. The location of the pattern inside the sequence is identified by the attributes <code>from</code> and <code>to</code>.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="bt:patternBase">
        <xs:attributeGroup ref="bt:scopeAttrs"/>
      </xs:extension>
    </xs:complexContent>
	</xs:complexType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

<!--
== Alignment ==

This section contains type declaration for sequence alignments.
-->

   <xs:simpleType name="alignmentSources">
      <xs:annotation>
         <xs:documentation>A list of predefined sequence alignment source names.</xs:documentation>
      </xs:annotation>
        <xs:restriction base="xs:token">
             <xs:enumeration value="urn:bts:clustalw"/>
        </xs:restriction>
   </xs:simpleType>

<!--
'''change log'''

* 04/23/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
  
  <xs:simpleType name="alignmentSource">
    <xs:annotation>
      <xs:documentation>The source of a sequence alignment. May be an URI, a LSID or one of the predefined source names.</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="bt:sourceUri bt:alignmentSources"/>
  </xs:simpleType>
    
<!--
'''references'''
* [[#simpleType_alignmentSources|simpleType alignmentSources]]
-->
<!--
'''change log'''

* 05/09/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->
	
	<xs:complexType name="multipleAlignment" final="restriction" block="restriction">
    <xs:annotation>
      <xs:documentation>A multiple sequence alignment. A overall score may be assigned to the multiple alignment using the <code>score</code> attribute. The source of the multiple alignment can be specified using the attributes <code>source</code> and <code>accNumber</code>. A multiple alignment must contain at least two aligned sequences. Thus one or more of the abstract elements <code>abstractAlignedRnaSequence</code>, <code>abstractAlignedDnaSequence</code>, <code>abstractAlignedSecondaryStructureSequence</code> or <code>abstractAlignedAminoAcidSequence</code> must be replaced by a concrete element. This can be done via a substitution group.</xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:sequence minOccurs="2" maxOccurs="unbounded">
        <xs:element ref="bt:abstractAlignedRnaSequence"/>
      </xs:sequence>
      <xs:sequence minOccurs="2" maxOccurs="unbounded">
        <xs:element ref="bt:abstractAlignedDnaSequence"/>
      </xs:sequence>
      <xs:sequence minOccurs="2" maxOccurs="unbounded">
        <xs:element ref="bt:abstractAlignedSecondaryStructureSequence"/>
      </xs:sequence>
      <xs:sequence minOccurs="2" maxOccurs="unbounded">
        <xs:element ref="bt:abstractAlignedAminoAcidSequence"/>
      </xs:sequence>
    </xs:choice>
    <xs:attributeGroup ref="bt:dataAttrs"/>
    <xs:attribute name="score" type="bt:score" use="optional"/>
    <xs:attribute name="source" type="bt:alignmentSource" use="optional" />
    <xs:attribute name="accNumber" type="bt:accessionNumber" use="optional"/>
	</xs:complexType>

<!--
'''change log'''

* 05/11/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:attributeGroup name="alignedSequenceAttrs">
    <xs:annotation>
      <xs:documentation>The attributes for an aligned sequence. The individual score for an aligned sequence may be set using the <code>score</code> attribute.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="score" type="bt:score" use="optional"/>
  </xs:attributeGroup>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:complexType name="alignedRnaSequence">
    <xs:annotation>
      <xs:documentation>An aligned RNA sequence.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="bt:gappedAmbiguousRnaSequence">
        <xs:attributeGroup ref="bt:alignedSequenceAttrs"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:element name="abstractAlignedRnaSequence" type="bt:alignedRnaSequence" abstract="true" final="restriction" block="restriction">
    <xs:annotation>
      <xs:documentation>An abstract aligned RNA sequence element for the multiple alignment.</xs:documentation>
    </xs:annotation>
  </xs:element>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->

  <xs:complexType name="alignedDnaSequence">
    <xs:annotation>
      <xs:documentation>An aligned DNA sequence.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="bt:gappedAmbiguousDnaSequence">
        <xs:attributeGroup ref="bt:alignedSequenceAttrs"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:element name="abstractAlignedDnaSequence" type="bt:alignedDnaSequence" abstract="true" final="restriction" block="restriction">
    <xs:annotation>
      <xs:documentation>An abstract aligned DNA sequence element for the multiple alignment.</xs:documentation>
    </xs:annotation>
  </xs:element>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:complexType name="alignedSecondaryStructureSequence">
    <xs:annotation>
      <xs:documentation>An aligned secondary structure sequence.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="bt:gappedAmbiguousSecondaryStructureSequence">
        <xs:attributeGroup ref="bt:alignedSequenceAttrs"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:element name="abstractAlignedSecondaryStructureSequence" type="bt:alignedSecondaryStructureSequence" abstract="true" final="restriction" block="restriction">
    <xs:annotation>
      <xs:documentation>An abstract aligned secondary structure sequence element for the multiple alignment.</xs:documentation>
    </xs:annotation>
  </xs:element>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:complexType name="alignedAminoAcidSequence">
    <xs:annotation>
      <xs:documentation>An aligned amino acid sequence.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="bt:gappedAmbiguousAminoAcidOneLetterSequence">
        <xs:attributeGroup ref="bt:alignedSequenceAttrs"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

  <xs:element name="abstractAlignedAminoAcidSequence" type="bt:alignedAminoAcidSequence" abstract="true" final="restriction" block="restriction">
    <xs:annotation>
      <xs:documentation>An abstract aligned amino acid sequence element for the multiple alignment.</xs:documentation>
    </xs:annotation>
  </xs:element>

<!--
'''change log'''

* 05/13/05 by [http://szugat.gmxhome.de Martin Szugat]: Initial declaration.
-->   

</xs:schema>
