<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 sp1 U (http://www.xmlspy.com) by Steve O'Hagan (The University of Manchester) -->
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Irena Spasic (UMIST) -->
<!-- 
    SCHEMA: samplepreparation.xsd
    AUTHOR: Irena Spasic
    LAST CHANGE: 28-09-2004
    DESCRIPTION: This document provides an XML schema for metabolomic footprinting.
-->
<xs:schema xmlns:SMP="http://www.samples.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ADM="http://www.admin.com" xmlns:BIO="http://www.bio.com" targetNamespace="http://www.samples.com" elementFormDefault="unqualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://www.admin.com" schemaLocation="admin.xsd"/>
	<xs:import namespace="http://www.bio.com" schemaLocation="bio.xsd"/>
	<xs:element name="Samples">
		<xs:annotation>
			<xs:documentation>A collection of samples produced as a result of a sample preparation experiment.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="SMP:Sample"/>
			</xs:sequence>
			<xs:attribute name="ID" type="xs:IDREF" use="required">
				<xs:annotation>
					<xs:documentation>An ID for a collection of samples and a reference to a set of sample preparation experiments used to produce the given collection of samples</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
		<xs:keyref name="SamplePreparationSet" refer="ADM:ExperimentSetID">
			<xs:selector xpath="."/>
			<xs:field xpath="@ID"/>
		</xs:keyref>
	</xs:element>
	<xs:element name="Sample">
		<xs:annotation>
			<xs:documentation>Identification of a sample produced as a result of a sample preparation experiment.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="name" type="xs:string" minOccurs="0">
					<xs:annotation>
						<xs:documentation>The name used to refer to the sample.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="ready_date" type="xs:date" minOccurs="0">
					<xs:annotation>
						<xs:documentation>The date on which the sample was made "ready to use".</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="ready_time" type="xs:time" minOccurs="0">
					<xs:annotation>
						<xs:documentation>The time at which the sample was made "ready to use".</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="expiry_date" type="xs:date">
					<xs:annotation>
						<xs:documentation>The sample's "best before" date.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="quantity" type="xs:float">
					<xs:annotation>
						<xs:documentation>The amount (in millilitres) of the sample.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="storage_conditions" type="xs:string" minOccurs="0">
					<xs:annotation>
						<xs:documentation>The conditions at which the sample is stored.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element ref="ADM:comment" minOccurs="0"/>
				<xs:element ref="SMP:Sample" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="ID" type="xs:ID" use="required"/>
			<xs:attribute name="experiment" type="xs:IDREF">
				<xs:annotation>
					<xs:documentation>A reference to an experiment used to prepare the given sample. NOTE: fill this attribute for the top most sample only</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="source" type="xs:IDREF">
				<xs:annotation>
					<xs:documentation>A reference to the biological source from which the sample was prepared. NOTE: fill this attribute for the top most sample only</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
		<xs:key name="SampleID">
			<xs:selector xpath="."/>
			<xs:field xpath="@ID"/>
		</xs:key>
		<xs:keyref name="SamplePreparationExperiment" refer="ADM:ExperimentID">
			<xs:selector xpath="."/>
			<xs:field xpath="@experiment"/>
		</xs:keyref>
		<xs:keyref name="Source" refer="BIO:BioSampleID">
			<xs:selector xpath="."/>
			<xs:field xpath="@source"/>
		</xs:keyref>
	</xs:element>
	<xs:element name="comment" type="xs:string">
		<xs:annotation>
			<xs:documentation>Additional comments.</xs:documentation>
		</xs:annotation>
	</xs:element>
</xs:schema>
