<?xml version="1.0" encoding="UTF-8"?>

<!-- 	document	: sequenceML schema definition
	version 		: 2.1
	date 		: 2006-02-01
	author		:  Henning Mersch <hmersch@techfak.uni-bielefeld.de>
			  Jan Krueger <jkrueger@techfak.uni-bielefeld.de>
			  Sven Hartmeier <shartmei@techfak.uni-bielefeld.de>
			  Kai Loewenthal <kloewent@techfak.uni-bielefeld.de>
	
-->

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
	targetNamespace="http://hobit.sourceforge.net/xsds/20060201/sequenceML"
	xmlns:bt="http://schemas.bioservices.net/2005/biotypes"
	xmlns:seq="http://hobit.sourceforge.net/xsds/20060201/sequenceML"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	version="2.1">

	<xs:import namespace="http://schemas.bioservices.net/2005/biotypes" schemaLocation="http://schemas.bioservices.net/2005/biotypes_1.1.xsd" />
	
	<!--                   -->
	<!-- ELEMENTS -->
	<!--                   -->
	<xs:element name="sequenceML" nillable="true">
		<xs:annotation>
			<xs:documentation>
				SequenceML deals with all kinds of simple sequence information often used as input
				for several common bioinformatics tools. It is designed to be used as a replacement 
				for the FASTA format, containing all of FASTA's information content while avoiding that 
				format's aforementioned consistency problems. SequenceML differentiates between 
				nucleic- and aminoacid sequences following the IUPAC standard and also allows the 
				user to add free sequence information based on basic types defined by BioTypes. 
				SequenceML also supports a mandatory sequence id and an optional detailed 
				sequence description. SequenceML does not contain any annotation information (for 
				this application, see SequenceAnnotationML.				
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" name="sequence" type="seq:sequenceType" />
			</xs:sequence>
			<xs:attribute name="version" type="bt:version" use="optional" />
		</xs:complexType>
	</xs:element>
	<!--             -->
	<!-- TYPES -->
	<!--             -->
	<xs:complexType name="sequenceType">
		<xs:sequence>
			<xs:element minOccurs="0" name="name" type="xs:string" />
			<xs:element minOccurs="0" maxOccurs="unbounded" name="synonyms" type="xs:string">
				<xs:annotation>
					<xs:documentation>Synonyms for this element</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element minOccurs="0" name="description" type="xs:string" />
			<xs:choice>
				<xs:element name="aminoAcidSequence" type="bt:ambiguousAminoAcidOneLetterSequence" />
				<xs:element name="nucleicAcidSequence" type="bt:ambiguousNucleotideSequence" />
				<xs:element name="freeSequence" type="bt:sequence" />
				<xs:element name="emptySequence" fixed=""/>
			</xs:choice>
			<xs:element maxOccurs="unbounded" minOccurs="0" name="comment" type="xs:string" />
		</xs:sequence>
		<xs:attribute name="seqID" type="bt:accessionNumber" use="required" />
		<xs:anyAttribute/>
	</xs:complexType>
</xs:schema>

