<?xml version = "1.0" encoding = "UTF-8"?>
<!-- style sheet OFF -->
<!--
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #
    # Copyright (C) 2002-2011 Open Microscopy Environment
    #       Massachusetts Institute of Technology,
    #       National Institutes of Health,
    #       University of Dundee,
    #       University of Wisconsin at Madison
    #
    # This work is licensed under the
    #       Creative Commons Attribution 3.0 Unported License.
    # To view a copy of this license, visit
    #       http://creativecommons.org/licenses/by/3.0/
    # or send a letter to
    #       Creative Commons, 444 Castro Street, Suite 900,
    #       Mountain View, California, 94041, USA.
    # For attribution instructions, visit
    #       http://www.openmicroscopy.org/info/attribution
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<!--
	#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	# Written by: Ilya G. Goldberg, Andrew J Patterson
	#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<xsd:schema xmlns="http://www.openmicroscopy.org/Schemas/OME/2011-06" 
	targetNamespace="http://www.openmicroscopy.org/Schemas/OME/2011-06" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:OME="http://www.openmicroscopy.org/Schemas/OME/2011-06"
	xmlns:BIN="http://www.openmicroscopy.org/Schemas/BinaryFile/2011-06" 
	xmlns:SPW="http://www.openmicroscopy.org/Schemas/SPW/2011-06" 
	xmlns:SA="http://www.openmicroscopy.org/Schemas/SA/2011-06" 
	xmlns:ROI="http://www.openmicroscopy.org/Schemas/ROI/2011-06" 
	xmlns:xml="http://www.w3.org/XML/1998/namespace"
	version="1" 
	elementFormDefault="qualified">

	<xsd:import namespace="http://www.openmicroscopy.org/Schemas/BinaryFile/2011-06" schemaLocation="http://www.openmicroscopy.org/Schemas/BinaryFile/2011-06/BinaryFile.xsd"/>
	<xsd:import namespace="http://www.openmicroscopy.org/Schemas/SPW/2011-06" schemaLocation="http://www.openmicroscopy.org/Schemas/SPW/2011-06/SPW.xsd"/>
	<xsd:import namespace="http://www.openmicroscopy.org/Schemas/SA/2011-06" schemaLocation="http://www.openmicroscopy.org/Schemas/SA/2011-06/SA.xsd"/>
	<xsd:import namespace="http://www.openmicroscopy.org/Schemas/ROI/2011-06" schemaLocation="http://www.openmicroscopy.org/Schemas/ROI/2011-06/ROI.xsd"/>

	<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>

	<xsd:annotation>
		<xsd:documentation>
			Open Microscopy Environment
			OME XML Schema April 2011
			Author:  Ilya G. Goldberg, Andrew J Patterson
			Copyright (C) 2002-2011 Open Microscopy Environment
		</xsd:documentation>
	</xsd:annotation>

	<!-- Main OME element -->
	<xsd:element name="OME"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The OME element is a container for all information objects accessible by OME.
				These information objects include descriptions of the imaging experiments
				and the people who perform them, descriptions of the microscope, the resulting
				images and how they were acquired, the analyses performed on those images,
				and the analysis results themselves.
				An OME file may contain any or all of this information.

				With the creation of the Metadata Only Companion OME-XML and Binary Only OME-TIFF files
				the top level OME node has changed slightly.
				It can EITHER:
				    Contain all the previously expected elements
				OR:
				    Contain a single BinaryOnly element that points at
				    its Metadata Only Companion OME-XML file.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:choice>
				<!-- Either: standard expected elements -->
				<xsd:sequence>
					<xsd:element ref="Project" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="Dataset" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="Experiment" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="SPW:Plate" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="SPW:Screen" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="Experimenter" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="Group" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="Instrument" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="Image" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="SA:StructuredAnnotations" minOccurs="0" maxOccurs="1"/>
					<xsd:element ref="ROI:ROI" minOccurs="0" maxOccurs="unbounded"/>
				</xsd:sequence>
				<!-- Or: Single BinaryOnly element -->
				<xsd:element name="BinaryOnly" minOccurs="1" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							Pointer to an external metadata file. If this element is
							present, then no other metadata may be present in this file,
							i.e. this file is a place-holder.
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:attribute name="MetadataFile" type="xsd:string" use="required">
							<xsd:annotation>
								<xsd:documentation>
									Filename of the OME-XML metadata file for this
									binary data. If the file cannot be found, a search can be
									performed based on the UUID.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:attribute>
						<xsd:attribute name="UUID" type="UniversallyUniqueIdentifier" use="required">
							<xsd:annotation>
								<xsd:documentation>
									The unique identifier of another OME-XML block
									whose metadata describes the binary data in this file. This UUID
									is considered authoritative regardless of mismatches in the
									filename.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:attribute>
					</xsd:complexType>
				</xsd:element>
				<!-- End of MetadataOnly Element -->
			</xsd:choice>
			<xsd:attribute name="UUID" type="UniversallyUniqueIdentifier" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						This unique identifier is used to keep track of multi part files.
						It allows the links between files to survive renaming.

						While OPTIONAL in the general case this is REQUIRED in a
						MetadataOnly Companion to a collection of BinaryOnly files.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Creator" type="xsd:string" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						This is the name of the creating application of the OME-XML
						and preferably its full version.
						e.g "CompanyName, SoftwareName, V2.6.3456"
						This is optional but we hope it will be set by applications
						writing out OME-XML from scratch.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>

		<!-- Unique IDs and Valid References -->
		<xsd:key name="ChannelIDKey"><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="DatasetIDKey"><xsd:selector xpath="OME:Dataset"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="DetectorIDKey"><xsd:selector xpath="OME:Instrument/OME:Detector"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="DichroicIDKey"><xsd:selector xpath="OME:Instrument/OME:Dichroic"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ExperimentIDKey"><xsd:selector xpath="OME:Experiment"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ExperimenterIDKey"><xsd:selector xpath="OME:Experimenter"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="FilterIDKey"><xsd:selector xpath="OME:Instrument/OME:Filter"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="FilterSetIDKey"><xsd:selector xpath="OME:Instrument/OME:FilterSet"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="GroupIDKey"><xsd:selector xpath="OME:Group"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ImageIDKey"><xsd:selector xpath="OME:Image"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="InstrumentIDKey"><xsd:selector xpath="OME:Instrument"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="LightSourceIDKey"><xsd:selector xpath="OME:Instrument/OME:LightSource"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="MicrobeamManipulationIDKey"><xsd:selector xpath="OME:Experiment/OME:MicrobeamManipulation"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="OTFIDKey"><xsd:selector xpath="OME:Instrument/OME:OTF"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ObjectiveIDKey"><xsd:selector xpath="OME:Instrument/OME:Objective"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="PixelsIDKey"><xsd:selector xpath="OME:Image/OME:Pixels"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="PlateIDKey"><xsd:selector xpath="SPW:Plate"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ProjectIDKey"><xsd:selector xpath="OME:Project"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ReagentIDKey"><xsd:selector xpath="SPW:Screen/SPW:Reagent"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ScreenAcquisitionIDKey"><xsd:selector xpath="SPW:Screen/SPW:ScreenAcquisition"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ScreenIDKey"><xsd:selector xpath="SPW:Screen"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="WellIDKey"><xsd:selector xpath="SPW:Plate/SPW:Well"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="WellSampleIDKey"><xsd:selector xpath="SPW:Plate/SPW:Well/SPW:WellSample"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ROIIDKey"><xsd:selector xpath="ROI:ROI"/><xsd:field xpath="@ID"/></xsd:key>
		<xsd:key name="ShapeIDKey"><xsd:selector xpath="ROI:ROI/ROI:Union/ROI:Shape"/><xsd:field xpath="@ID"/></xsd:key>
		
		<xsd:keyref name="DatasetExperimenterIDKeyRef" refer="OME:ExperimenterIDKey" ><xsd:selector xpath="OME:Dataset/OME:ExperimenterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="DatasetGroupIDKeyRef" refer="OME:GroupIDKey" ><xsd:selector xpath="OME:Dataset/OME:GroupRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="DatasetProjectIDKeyRef" refer="OME:ProjectIDKey" ><xsd:selector xpath="OME:Dataset/OME:ProjectRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ExperimentExperimenterIDKeyRef" refer="OME:ExperimenterIDKey" ><xsd:selector xpath="OME:Experiment/OME:ExperimenterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ExperimentMicrobeamManipulationExperimenterIDKeyRef" refer="OME:ExperimenterIDKey" ><xsd:selector xpath="OME:Experiment/OME:MicrobeamManipulation/OME:ExperimenterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ExperimentMicrobeamManipulationLightSourceSettingsLightSourceIDKeyRef" refer="OME:LightSourceIDKey" ><xsd:selector xpath="OME:Experiment/OME:MicrobeamManipulation/OME:LightSourceSettings"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ExperimenterGroupIDKeyRef" refer="OME:GroupIDKey" ><xsd:selector xpath="OME:Experimenter/OME:GroupRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="GroupContactExperimenterIDKeyRef" refer="OME:ExperimenterIDKey" ><xsd:selector xpath="OME:Group/OME:Contact"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="GroupLeaderExperimenterIDKeyRef" refer="OME:ExperimenterIDKey" ><xsd:selector xpath="OME:Group/OME:Leader"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImageDatasetIDKeyRef" refer="OME:DatasetIDKey" ><xsd:selector xpath="OME:Image/OME:DatasetRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImageExperimenterIDKeyRef" refer="OME:ExperimenterIDKey" ><xsd:selector xpath="OME:Image/OME:ExperimenterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImageExperimentIDKeyRef" refer="OME:ExperimentIDKey" ><xsd:selector xpath="OME:Image/OME:ExperimentRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImageGroupIDKeyRef" refer="OME:GroupIDKey" ><xsd:selector xpath="OME:Image/OME:GroupRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImageInstrumentIDKeyRef" refer="OME:InstrumentIDKey" ><xsd:selector xpath="OME:Image/OME:InstrumentRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImageMicrobeamManipulationIDKeyRef" refer="OME:MicrobeamManipulationIDKey" ><xsd:selector xpath="OME:Image/OME:MicrobeamManipulationRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImageObjectiveSettingsObjectiveIDKeyRef" refer="OME:ObjectiveIDKey" ><xsd:selector xpath="OME:Image/OME:ObjectiveSettings"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelDetectorSettingsDetectorIDKeyRef" refer="OME:DetectorIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:DetectorSettings"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelFilterSetIDKeyRef" refer="OME:FilterSetIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:FilterSetRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelLightPathExcitationFilterIDKeyRef" refer="OME:FilterIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:LightPath/OME:ExcitationFilterPath/OME:FilterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelLightPathExcitationDichroicIDKeyRef" refer="OME:DichroicIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:LightPath/OME:ExcitationFilterPath/OME:DichroicRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelLightPathDichroicIDKeyRef" refer="OME:DichroicIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:LightPath/OME:DichroicRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelLightPathEmissionFilterIDKeyRef" refer="OME:FilterIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:LightPath/OME:EmissionFilterPath/OME:FilterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelLightPathEmissionDichroicIDKeyRef" refer="OME:DichroicIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:LightPath/OME:EmissionFilterPath/OME:DichroicRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelLightSourceSettingsLightSourceIDKeyRef" refer="OME:LightSourceIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:LightSourceSettings"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImagePixelsChannelOTFIDKeyRef" refer="OME:OTFIDKey" ><xsd:selector xpath="OME:Image/OME:Pixels/OME:Channel/OME:OTFRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="InstrumentFilterSetExcitationFilterIDKeyRef" refer="OME:FilterIDKey" ><xsd:selector xpath="OME:Instrument/OME:FilterSet/OME:ExcitationFilterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="InstrumentFilterSetDichroicIDKeyRef" refer="OME:DichroicIDKey" ><xsd:selector xpath="OME:Instrument/OME:FilterSet/OME:DichroicRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="InstrumentFilterSetEmissionFilterIDKeyRef" refer="OME:FilterIDKey" ><xsd:selector xpath="OME:Instrument/OME:FilterSet/OME:EmissionFilterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="InstrumentLightSourceLaserPumpLightSourceIDKey" refer="OME:LightSourceIDKey" ><xsd:selector xpath="OME:Instrument/OME:LightSource/OME:Laser/OME:Pump"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="InstrumentOTFFilterSetIDKeyRef" refer="OME:FilterSetIDKey" ><xsd:selector xpath="OME:Instrument/OME:OTF/OME:FilterSetRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="InstrumentOTFObjectiveSettingsObjectiveIDKeyRef" refer="OME:ObjectiveIDKey" ><xsd:selector xpath="OME:Instrument/OME:OTF/OME:ObjectiveSettings"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="PlateScreenIDKeyRef" refer="OME:ScreenIDKey" ><xsd:selector xpath="SPW:Plate/SPW:ScreenRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="PlateWellReagentIDKeyRef" refer="OME:ReagentIDKey" ><xsd:selector xpath="SPW:Plate/SPW:Well/SPW:ReagentRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="PlateWellWellSampleImageIDKeyRef" refer="OME:ImageIDKey" ><xsd:selector xpath="SPW:Plate/SPW:Well/SPW:WellSample/SPW:ImageRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ProjectExperimenterIDKeyRef" refer="OME:ExperimenterIDKey" ><xsd:selector xpath="OME:Project/OME:ExperimenterRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ProjectGroupIDKeyRef" refer="OME:GroupIDKey" ><xsd:selector xpath="OME:Project/OME:GroupRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ScreenPlateIDKeyRef" refer="OME:PlateIDKey" ><xsd:selector xpath="SPW:Screen/SPW:PlateRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ScreenScreenAcquisitionWellSampleIDKeyRef" refer="OME:WellSampleIDKey" ><xsd:selector xpath="SPW:Screen/SPW:ScreenAcquisition/SPW:WellSampleRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ExperimentMicrobeamManipulationROIIDKeyRef" refer="OME:ROIIDKey" ><xsd:selector xpath="OME:Experiment/OME:MicrobeamManipulation/ROI:ROIRef"/><xsd:field xpath="@ID"/></xsd:keyref>
		<xsd:keyref name="ImageROIIDKeyRef" refer="OME:ROIIDKey" ><xsd:selector xpath="OME:Image/ROI:ROIRef"/><xsd:field xpath="@ID"/></xsd:keyref>
	</xsd:element>

	<!-- Key pixel storage elements -->
	<xsd:element name="Image"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This element describes the actual image and its meta-data.
				The elements that are references (ending in Ref or Settings) refer to
				elements defined outside of the Image element. Ref elements are simple
				links, while Settings elements are links with additional values. 
				
				If any of the required Image attributes or elements are missing, its 
				guaranteed to be an invalid document. The required attributes and 
				elements are ID and Pixels.
				

ExperimenterRef is required for all Images with well formed LSIDs.
				ImageType is a vendor-specific designation of the type of image this is.
				Examples of ImageType include 'STK', 'SoftWorx', etc.
				The Name attributes are in all cases the name of the element instance. In this case, the name of the image,
				not necessarily the filename.
				PixelSize* is in microns[um].
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="AcquiredDate" minOccurs="0" maxOccurs="1" type="xsd:dateTime">
					<xsd:annotation>
						<xsd:documentation>
							The acquisition date of the Image.
							The element contains a string in the ISO 8601 dateTime format (i.e. 1988-04-07T18:39:09)
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="ExperimenterRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="Description" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							A description for the image. [plane text multi-line string]
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:whiteSpace value="preserve"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:element ref="ExperimentRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="GroupRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="DatasetRef" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="InstrumentRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="ObjectiveSettings" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="ImagingEnvironment" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="StageLabel" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="Pixels" minOccurs="1" maxOccurs="1"/>
				<xsd:element ref="ROI:ROIRef" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="MicrobeamManipulationRef" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="SA:AnnotationRef" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="ID" use="required" type="ImageID"/>
			<xsd:attribute name="Name" use="optional" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Pixels"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The Image will be unreadable if any of the required Pixel attributes are missing.
				The Pixels themselves are stored within the file compressed by plane, and encoded in Base64.
				The Pixels element must contain a list of BinData, each containing a single plane of pixels.
				These Pixels elements, when read in document order, must produce a 5-D pixel array
				of the size specified in this element, and in the dimension order specified by 'DimensionOrder'.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="Channel" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:choice minOccurs="1" maxOccurs="1">
					<xsd:element ref="BIN:BinData" minOccurs="1" maxOccurs="unbounded"/>
					<xsd:element ref="TiffData" minOccurs="1" maxOccurs="unbounded"/>
					<xsd:element ref="MetadataOnly" minOccurs="1" maxOccurs="1"/>
				</xsd:choice>
				<xsd:element ref="Plane" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="SA:AnnotationRef" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="ID" use="required" type="PixelsID"/>
			<xsd:attribute name="DimensionOrder" use="required">
				<xsd:annotation>
					<xsd:documentation>
						The order in which the individual planes of data are interleaved.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="XYZCT"/>
						<xsd:enumeration value="XYZTC"/>
						<xsd:enumeration value="XYCTZ"/>
						<xsd:enumeration value="XYCZT"/>
						<xsd:enumeration value="XYTCZ"/>
						<xsd:enumeration value="XYTZC"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="Type" use="required" type="PixelType">
				<xsd:annotation>
					<xsd:documentation>
						The variable type used to represent each pixel in the image.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SizeX" use="required" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>Dimensional size of pixel data array [units:none]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SizeY" use="required" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>Dimensional size of pixel data array [units:none]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SizeZ" use="required" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>Dimensional size of pixel data array [units:none]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SizeC" use="required" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>Dimensional size of pixel data array [units:none]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SizeT" use="required" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>Dimensional size of pixel data array [units:none]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="PhysicalSizeX" use="optional" type="PositiveFloat">
				<xsd:annotation>
					<xsd:documentation>Physical size of a pixel in microns[um].</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="PhysicalSizeY" use="optional" type="PositiveFloat">
				<xsd:annotation>
					<xsd:documentation>Physical size of a pixel in microns[um].</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="PhysicalSizeZ" use="optional" type="PositiveFloat">
				<xsd:annotation>
					<xsd:documentation>Physical size of a pixel in microns[um].</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="TimeIncrement" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						TimeIncrement is used for time series that have a global 
						timing specification instead of per-timepoint timing info.
						For example in a video stream.  The unit is seconds[s].
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Plane"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The Plane object holds microscope stage and image timing data 
				for a given channel/z-section/timepoint. 
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:choice minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							This optional element is a hash of the plane's image data. 
							It is a choice between all the support hash types.
							Currently the only method supported is SHA1.
						</xsd:documentation>
					</xsd:annotation>
					<xsd:element name="HashSHA1" type="Hex40" minOccurs="1" maxOccurs="1"/>
				</xsd:choice>
				<xsd:element ref="SA:AnnotationRef" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="TheZ" use="required" type="NonNegativeInt">
				<xsd:annotation>
					<xsd:documentation>
						The Z-section this plane is for. [units:none]
						This is numbered from 0.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="TheT" use="required" type="NonNegativeInt">
				<xsd:annotation>
					<xsd:documentation>
						The timepoint this plane is for. [units:none]
						This is numbered from 0.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="TheC" use="required" type="NonNegativeInt">
				<xsd:annotation>
					<xsd:documentation>
						The channel this plane is for. [units:none]
						This is numbered from 0.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute> 
			<xsd:attribute name="DeltaT" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						Units are seconds since the beginning of the experiment [s]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="ExposureTime" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						Units are seconds [s]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="PositionX" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The X position of the stage. [units are in the microscope reference frame]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="PositionY" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The Y position of the stage. [units are in the microscope reference frame]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="PositionZ" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The Z position of the stage. [units are in the microscope reference frame]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Channel"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				There must be one per channel in the Image, even for a single-plane image.  
				And information about how each of them was acquired is stored in the various optional *Ref elements.  Each Logical Channel is composed of one or more
				ChannelComponents.  For example, an entire spectrum in an FTIR experiment may be stored in a single Logical Channel with each discrete wavenumber of the spectrum
				constituting a ChannelComponent of the FTIR Logical Channel.  An RGB image where the Red, Green and Blue components do not reflect discrete probes but are
				instead the output of a color camera would be treated similarly - one Logical channel with three ChannelComponents in this case.
				The total number of ChannelComponents for a set of pixels must equal SizeC.
				The IlluminationType attribute is a string enumeration which may be set to 'Transmitted', 'Epifluorescence', 'Oblique', or 'NonLinear'.
				The PhotometricInterpretation attribute is used to describe how to display a multi-component channel.  This attribute may be set to:
				'monochrome', 'RGB', 'ARGB', 'CMYK', 'HSV'.  The default for single-component channels is 'monochrome'.
				The user interface logic for labeling a given channel for the user should use the first existing attribute in the following sequence:
				Name -> Fluor -> EmissionWavelength -> ChannelComponent/Index.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="LightSourceSettings" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="OTFRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="DetectorSettings" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="FilterSetRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="SA:AnnotationRef" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="LightPath" minOccurs="0" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="ID" use="required" type="ChannelID"/>
			<xsd:attribute name="Name" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A name for the channel that is suitable be presented to the user.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SamplesPerPixel" use="optional" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>
						The number of samples the detector takes to form each pixel value.
						The SamplesPerPixel attribute is the number of channel components in the logical channel. [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="IlluminationType" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						The method of illumination used to capture the channel. 
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="Transmitted"/>
						<xsd:enumeration value="Epifluorescence"/>
						<xsd:enumeration value="Oblique"/>
						<xsd:enumeration value="NonLinear"/>
						<xsd:enumeration value="Other"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="PinholeSize" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The optional PinholeSize attribute allows specifying adjustable 
						pin hole diameters for confocal microscopes (units microns[um]).
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="AcquisitionMode" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						AcquisitionMode describes the type of microscopy performed for each channel
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="WideField"/>
						<xsd:enumeration value="LaserScanningConfocalMicroscopy"/> <!-- CLSM or LSCM -->
						<xsd:enumeration value="SpinningDiskConfocal"/>
						<xsd:enumeration value="SlitScanConfocal"/>
						<xsd:enumeration value="MultiPhotonMicroscopy"/><!-- laser scanning multiphoton microscopy (LSMM), two photon microscopy -->
						<xsd:enumeration value="StructuredIllumination"/>
						<xsd:enumeration value="SingleMoleculeImaging"/>
						<xsd:enumeration value="TotalInternalReflection"/>
						<xsd:enumeration value="FluorescenceLifetime"/>
						<xsd:enumeration value="SpectralImaging"/>
						<xsd:enumeration value="FluorescenceCorrelationSpectroscopy"/>
						<xsd:enumeration value="NearFieldScanningOpticalMicroscopy"/><!-- NSOM -->
						<xsd:enumeration value="SecondHarmonicGenerationImaging"/><!-- Second harmonic imaging microscopy (SHIM) -->
						<xsd:enumeration value="PALM"/><!-- photo-activated localization microscopy, photo-activation localization microscopy -->
						<xsd:enumeration value="STORM"/><!-- stochastic optical reconstruction microscopy -->
						<xsd:enumeration value="STED"/><!-- stimulated emission depletion -->
						<xsd:enumeration value="TIRF"/><!-- total internal reflection fluorescence (TIRFM) -->
						<xsd:enumeration value="FSM"/><!-- Fluorescence speckle microscopy -->
						<xsd:enumeration value="LCM"/><!-- Laser capture microdissection -->
						<xsd:enumeration value="Other"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="ContrastMethod" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						ContrastMethod describes the technique used to achieve contrast for each channel
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="Brightfield"/>
						<xsd:enumeration value="Phase"/>
						<xsd:enumeration value="DIC"/><!-- Differential Interference Contrast -->
						<xsd:enumeration value="HoffmanModulation"/><!-- Hoffman Modulation Contrast (HMC) -->
						<xsd:enumeration value="ObliqueIllumination"/>
						<xsd:enumeration value="PolarizedLight"/> <!-- Polarization Microscopy -->
						<xsd:enumeration value="Darkfield"/><!-- Dark Field Imaging -->
						<xsd:enumeration value="Fluorescence"/>
						<xsd:enumeration value="Other"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="ExcitationWavelength" use="optional" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>
						Excitation wavelength of excitation for a particular channel, in nanometres[nm].
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="EmissionWavelength" use="optional" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>
						Emission wavelength of excitation for a particular channel, in nanometres[nm].
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Fluor" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						The Fluor attribute is used for fluorescence images.
						This is the name of the fluorophore used to produce this channel [plain text string]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="NDFilter" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The NDfilter attribute is used to specify the combined effect of any neutral density filters used. [units optical density expressed as a PercentFraction] 
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>	
			<xsd:attribute name="PockelCellSetting" use="optional" type="xsd:int">
				<xsd:annotation>
					<xsd:documentation>
						The PockelCellSetting used for this channel. This is the amount the polarization of the beam is rotated by. [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Color" use="optional" type="xsd:int" default="-2147483648">
				<xsd:annotation>
					<xsd:documentation>
						A color used render this channel - encoded as RGBA
						The default value "-2147483648" is #FFFFFFFF so solid white (it is a signed 32 bit value)
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<!-- Other elements associated with pixel storage -->
	<xsd:element name="MetadataOnly"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This place holder means there is on pixel data in this file.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="TiffData"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This described the location of the pixel data in a tiff file.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="UUID" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							This must be used when the IFDs are located in another file.
							Note: It is permissible for this to be self referential.
						</xsd:documentation>
					</xsd:annotation>
					<xsd:complexType>
						<xsd:simpleContent>
							<xsd:extension base = "UniversallyUniqueIdentifier">
								<xsd:attribute name="FileName" use="optional" type="xsd:string">
									<xsd:annotation>
										<xsd:documentation>
											This can be used when the IFDs are located in another file.
											The / (forward slash) is used as the path separator.
											A relative path is recommended. However an absolute path can be specified.
											Default is to use the file the ome-xml data has been pulled from.
											Note: It is permissible for this to be self referential. The file image1.tiff
											may contain ome-xml data that has FilePath="image1.tiff" or "./image1.tiff"
										</xsd:documentation>
									</xsd:annotation>
								</xsd:attribute>
							</xsd:extension>
						</xsd:simpleContent>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
			<xsd:attribute name="IFD" type="NonNegativeInt" default="0" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						Gives the IFD(s) for which this element is applicable. Indexed from 0. 
						Default is 0 (the first IFD). [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="FirstZ" type="NonNegativeInt" default="0" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						Gives the Z position of the image plane at the specified IFD. Indexed from 0. 
						Default is 0 (the first Z position). [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="FirstT" type="NonNegativeInt" default="0" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						Gives the T position of the image plane at the specified IFD. Indexed from 0.
						Default is 0 (the first T position). [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="FirstC" type="NonNegativeInt" default="0" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						Gives the C position of the image plane at the specified IFD. Indexed from 0. 
						Default is 0 (the first C position). [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="PlaneCount" use="optional" type="NonNegativeInt">
				<xsd:annotation>
					<xsd:documentation>
						Gives the number of IFDs affected. Dimension order of IFDs is given by the enclosing
						Pixels element's DimensionOrder attribute. Default is the number of IFDs in the TIFF
						file, unless an IFD is specified, in which case the default is 1. [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="StageLabel"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The StageLabel is used to specify a name and position for a stage position in the microscope's reference frame.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="Name" use="required" type="xsd:string"/>
			<xsd:attribute name="X" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The X position of the stage label. [units are in the microscope reference frame]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Y" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The Y position of the stage label. [units are in the microscope reference frame]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Z" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The Z position of the stage label. [units are in the microscope reference frame]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<!-- Misc -->
	<xsd:element name="MicrobeamManipulation"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				Defines a microbeam operation type and the region of the image it was applied to.
				The LightSourceRef element is a reference to a LightSource specified in the Instrument element which was used for a technique other than illumination for
				the purpose of imaging. For example, a laser used for photobleaching.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Description" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							A description for the Microbeam Manipulation. [plane text multi-line string]
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:whiteSpace value="preserve"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:element ref="ROI:ROIRef" minOccurs="1" maxOccurs="unbounded"/>
				<xsd:element ref="ExperimenterRef" minOccurs="1" maxOccurs="1"/>
				<xsd:element ref="LightSourceSettings" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="ID" use="required" type="MicrobeamManipulationID"/>
			<xsd:attribute name="Type" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						The type of manipulation performed.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:list>
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="FRAP"/><!-- Fluorescence recovery after photobleaching -->
								<xsd:enumeration value="FLIP"/><!-- Fluorescence Loss in Photobleaching -->
								<xsd:enumeration value="InverseFRAP"/><!-- iFRAP, inverse FRAP -->
								<xsd:enumeration value="Photoablation"/>
								<xsd:enumeration value="Photoactivation"/>
								<xsd:enumeration value="Uncaging"/>
								<xsd:enumeration value="OpticalTrapping"/>
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:list>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<!-- Physical microscope elements -->
	<xsd:element name="Instrument"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This element describes the instrument used to capture the Image.
				It is primarily a container for manufacturer's model and catalog 
				numbers for the Microscope, LightSource, Detector, Objective and 
				Filters components.
				Additionally, one or more OTF elements may be specified, describing 
				the optical transfer function under different conditions.
				The Objective element contains the additional elements LensNA and Magnification.
				The Filters element can be composed either of separate excitation, 
				emission filters and a dichroic mirror or a single filter set. 
				Within the Image itself, a reference is made to this one Filter element.
				The OTF element contains an optical transfer function.
				The same OTF can be used for all wavelengths, or there may be one per wavelength.
				There may be multiple light sources, detectors, objectives and filters on a microscope.
				Each of these has their own ID attribute, which can be referred to from Channel.
				It is understood that the light path configuration can be different 
				for each channel, but cannot be different for each timepoint or 
				each plane of an XYZ stack.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="Microscope" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="LightSource" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="Detector" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="Objective" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="FilterSet" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="Filter" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="Dichroic" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="OTF" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="ID" use="required" type="InstrumentID"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Microscope"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>The microscope's manufacturer specification.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="ManufacturerSpec">
					<xsd:attribute name="Type" use="optional">
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="Upright"/>
								<xsd:enumeration value="Inverted"/>
								<xsd:enumeration value="Dissection"/>
								<xsd:enumeration value="Electrophysiology"/>
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="OTF"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				NOTE: OTF is DEPRECATED as it is due to be removed. 
				No objections were received in reply to:
				http://lists.openmicroscopy.org.uk/pipermail/ome-devel/2011-April/001931.html

				The optical transfer function. FilterSetRef refers to the set of 
				filters used in computing the OTF.
				This element must contain a BinData element containing the 
				Base64-encoded OTF. These work the same way as they do for the 
				Data element within Image.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="ObjectiveSettings" minOccurs="1" maxOccurs="1"/>
				<xsd:element ref="FilterSetRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="BIN:BinaryFile" minOccurs="1" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="ID" use="required" type="OTFID"/>
			<xsd:attribute name="Type" use="required" type="PixelType">
				<xsd:annotation>
					<xsd:documentation>
						The variable type used to specify the size of pixel the OTF is for designed for.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="OpticalAxisAveraged" use="required" type="xsd:boolean">
				<xsd:annotation>
					<xsd:documentation>
						The OpticalAxisAveraged is a boolean specifying whether or not 
						optical axis averaging was done. [flag]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SizeX" use="required" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>
						The width of the OTF. [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="SizeY" use="required" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>
						The height of the OTF. [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<!-- Image sample elements -->
	<xsd:element name="ImagingEnvironment"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This describes the environment that the biological sample was in 
				during the experiment.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="Temperature" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The Temperature is in Celsius[C].
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="AirPressure" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						AirPressure is in millibars[mbar].
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Humidity" use="optional" type="PercentFraction">
				<xsd:annotation>
					<xsd:documentation>
						Humidity around the sample [units:none]
						A fraction, as a value from 0.0 to 1.0.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="CO2Percent" use="optional" type="PercentFraction">
				<xsd:annotation>
					<xsd:documentation>
						Carbon Dioxide concentration around the sample [units:none]
						A fraction, as a value from 0.0 to 1.0.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<!-- Structure elements -->
	<xsd:element name="Project"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The Project ID is required.
				Datasets can be grouped into projects using a many-to-many relationship.
				A Dataset may belong to one or more Projects by including one or more ProjectRef elements which refer to Project IDs.
				Projects do not directly contain images - only by virtue of containing datasets, which themselves contain images.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Description" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							A description for the project. [plane text multi-line string]
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:whiteSpace value="preserve"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:element ref="ExperimenterRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="GroupRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="SA:AnnotationRef" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="Name" use="optional" type="xsd:string"/>
			<xsd:attribute name="ID" use="required" type="ProjectID"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Group"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The Group ID is required.
				Contact information should be specified for the leader of the group and a contact person.
				The Leader and/or Contact are themselves experimenters.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Description" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							A description for the group. [plane text multi-line string]
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:whiteSpace value="preserve"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:element ref="Leader" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="Contact" minOccurs="0" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="Name" use="optional" type="xsd:string"/>
			<xsd:attribute name="ID" use="required" type="GroupID"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Leader"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				Contact information for a Group leader specified using a reference 
				to an Experimenter element defined elsewhere in the document.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="ExperimenterID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Contact"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The Contact element describes the contact person for a group of 
				experimenters - typically a project leader or lab manager.
				This person is specified as a reference to an OME experimenter.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="ExperimenterID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Dataset"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				An element specifying a collection of images that are always processed together.
				Images can belong to more than one Dataset, and a Dataset may contain more than one Image.
				Images contain one or more DatasetRef elements to specify what datasets they belong to.
				Once a Dataset has been processed in any way, its collection of images cannot be altered.
				The ExperimenterRef and GroupRef elements specify the person and group this Dataset belongs to.
				Projects may contain one or more Datasets, and Datasets may belong to one or more Projects.
				This relationship is specified by listing ProjectRef elements within the Dataset element.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Description" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							A description for the dataset. [plane text multi-line string]
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:whiteSpace value="preserve"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:element ref="ExperimenterRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="GroupRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element ref="ProjectRef" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="SA:AnnotationRef" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="Name" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A name for the dataset that is suitable be presented to the user.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="ID" use="required" type="DatasetID"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Experiment"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This element describes the type of experiment.  The required Type attribute must contain one or more entries from the following list:
				FP FRET Time-lapse 4-D+ Screen Immunocytochemistry FISH Electrophysiology  Ion-Imaging Colocalization PGI/Documentation
				FRAP Photoablation Optical-Trapping Photoactivation Fluorescence-Lifetime Spectral-Imaging Other
				FP refers to fluorescent proteins, PGI/Docuemntation is not a 'data' image.
				The optional Description element may contain free text to further describe the experiment.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Description" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							A description for the experiment. [plane text multi-line string]
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:whiteSpace value="preserve"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:element ref="ExperimenterRef" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							This is a link to the Experimenter who conducted the experiment
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="MicrobeamManipulation" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="Type" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						A term to describe the type of experiment. 
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:list>
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="FP"/>
								<xsd:enumeration value="FRET"/><!-- Förster resonance energy transfer, also known as fluorescence resonance energy transfer, resonance energy transfer (RET) or electronic energy transfer (EET) -->
								<xsd:enumeration value="TimeLapse"/><!--  Time-lapse microscopy (microphotography, photomicrography) -->
								<xsd:enumeration value="FourDPlus"/>
								<xsd:enumeration value="Screen"/>
								<xsd:enumeration value="Immunocytochemistry"/>
								<xsd:enumeration value="Immunofluorescence"/>
								<xsd:enumeration value="FISH"/><!-- Fluorescent in situ hybridization -->
								<xsd:enumeration value="Electrophysiology"/>
								<xsd:enumeration value="IonImaging"/>
								<xsd:enumeration value="Colocalization"/>
								<xsd:enumeration value="PGIDocumentation"/>
								<xsd:enumeration value="FluorescenceLifetime"/><!-- Fluorescence lifetime imaging (FLIM) -->
								<xsd:enumeration value="SpectralImaging"/>
								<xsd:enumeration value="Photobleaching"/>
								<xsd:enumeration value="SPIM"/><!-- Selective or Single Plane Illumination Microscopy -->
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:list>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="ID" use="required" type="ExperimentID"/>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Experimenter"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This element describes a person who performed an imaging experiment.
				This person may also be a user of the OME system, in which case the UserName element contains their login name.
				Experimenters may belong to one or more groups which are specified using one or more GroupRef elements.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="GroupRef" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="SA:AnnotationRef" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="ID" use="required" type="ExperimenterID"/>
			<xsd:attribute name="DisplayName" use="required" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>This is the only required name field. [plain text string]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="FirstName" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>First name, sometime called christian name or given name or forename. [plain text string]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="MiddleName" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>Any other names. [plain text string]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="LastName" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>A person's last name sometimes called surname or family name. [plain text string]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Email" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>A person's email address. [valid email address as string]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Institution" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A person's Institution
						The organizing structure that people belong to other than groups.  A university, or company, etc.
						We do not specify a department element, and do not mean for Institution to be used in this way.
						We simply wish to say XXX at YYY.  Where YYY has a better chance of being tied to a geographically fixed location
						and of being more recognizable than a group of experimenters. [plain text string]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="UserName" use="optional" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>This is the username of the experimenter (in a 'unix' or 'database' sense). [plain text string]</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<!-- Common types -->
	<xsd:complexType name="ManufacturerSpec">
		<xsd:annotation>
			<xsd:appinfo>abstract</xsd:appinfo>
			<xsd:documentation>
				This is the base from which many microscope components are extended. E.g Objective, Filter etc. 
				Provides attributes for recording common properties of these components such as Manufacturer name, Model etc, 
				all of which are optional. 
			</xsd:documentation>
		</xsd:annotation>
		<xsd:attribute name="Manufacturer" use="optional" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					The manufacturer of the component. [plain text string]
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="Model" use="optional" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					The Model of the component. [plain text string]
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="SerialNumber" use="optional" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					The serial number of the component. [plain text string]
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="LotNumber" use="optional" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					The lot number of the component. [plain text string]
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
	<xsd:simpleType name="Hex40">
		<xsd:annotation>
			<xsd:documentation>
				Binary contents coded in hexadecimal (20 characters long)
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:hexBinary">
			<xsd:length value="20"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="NonNegativeLong">
		<xsd:annotation>
			<xsd:documentation>
				A simple type that restricts the value to an integer between 0 and 9223372036854775807 (inclusive).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:long">
			<xsd:minInclusive value="0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="NonNegativeInt">
		<xsd:annotation>
			<xsd:documentation>
				A simple type that restricts the value to an integer between 0 and 2,147,483,647 (inclusive).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:int">
			<xsd:minInclusive value="0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="PositiveInt">
		<xsd:annotation>
			<xsd:documentation>
				A simple type that restricts the value to an integer between 1 and 2,147,483,647 (inclusive).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:int">
			<xsd:minInclusive value="1"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="PositiveFloat">
		<xsd:annotation>
			<xsd:documentation>
				A simple type that restricts the value to a float between >0 and max 32-bit float {i.e. (2−2^-23) × 2^27 ≈ 3.4 × 10^38}
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:float">
			<xsd:minExclusive value="0.0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="PercentFraction">
		<xsd:annotation>
			<xsd:documentation>
				A simple type that restricts the value to a float between 0 and 1 (inclusive).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:float">
			<xsd:maxInclusive value="1.0"/>
			<xsd:minInclusive value="0.0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="UniversallyUniqueIdentifier">
		<xsd:annotation>
			<xsd:documentation>
				This is a unique ID for the file but does not conform to the ID pattern used in the rest of the file.
				The rest of the IDs are either an full LSID or an internal ID which is a string that is simply unique in this file.
				As the UniversallyUniqueIdentifier is used from outside this file to identify it having the same ID in another file could cause problems.
				A UUID is 32 hexadecimal digits, in 5 groups, 8-4-4-4-12, separated by hyphens
				e.g. urn:uuid:3e450fae-b8f2-4d35-aa54-702168b2487f
				There are methods to generate these in most modern languages.
				http://www.ietf.org/rfc/rfc4122.txt
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:anyURI">
			<xsd:pattern value="(urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="PixelType">
		<xsd:annotation>
			<xsd:documentation>
				The number size/kind used to represent a pixel
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value = "int8"/>
			<xsd:enumeration value = "int16"/>
			<xsd:enumeration value = "int32"/>
			<xsd:enumeration value = "uint8"/>
			<xsd:enumeration value = "uint16"/>
			<xsd:enumeration value = "uint32"/>
			<xsd:enumeration value = "float"/>
			<xsd:enumeration value = "bit"/>
			<xsd:enumeration value = "double"/>
			<xsd:enumeration value = "complex"/>
			<xsd:enumeration value = "double-complex"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!-- Objective elements -->
	<xsd:element name="Objective"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				A description of the microscope's objective lens.
				Required elements include the lens numerical aperture, 
				and the magnification, both of which a floating 
				point (real) numbers.
				The values are those that are fixed for a particular 
				objective: either because it has been manufactured to 
				this specification or the value has been measured on 
				this particular objective.
				Correction: This is the type of correction coating applied to this lens.
				Immersion: This is the types of immersion medium the lens is designed to
				work with. It is not the same as 'Medium' in ObjectiveRef (a 
				single type) as here Immersion can have compound values like 'Multi'.
				LensNA: The numerical aperture of the lens (as a float)
				NominalMagnification: The specified magnification e.g. x10
				CalibratedMagnification: The measured magnification e.g. x10.3
				WorkingDistance: WorkingDistance of the lens. The Units are microns[um].
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="ManufacturerSpec">
					<xsd:attribute name="ID" use="required" type="ObjectiveID"/>
					<xsd:attribute name="Correction" use="optional">
						<xsd:annotation>
							<xsd:documentation>The correction applied to the lens</xsd:documentation>
						</xsd:annotation>
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="UV"/>
								<xsd:enumeration value="PlanApo"/>
								<xsd:enumeration value="PlanFluor"/>
								<xsd:enumeration value="SuperFluor"/>
								<xsd:enumeration value="VioletCorrected"/>
								<xsd:enumeration value="Achro"/>
								<xsd:enumeration value="Achromat"/>
								<xsd:enumeration value="Fluor"/>
								<xsd:enumeration value="Fl"/>
								<xsd:enumeration value="Fluar"/>
								<xsd:enumeration value="Neofluar"/>
								<xsd:enumeration value="Fluotar"/>
								<xsd:enumeration value="Apo"/>
								<xsd:enumeration value="PlanNeofluar"/>
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
					<xsd:attribute name="Immersion" use="optional">
						<xsd:annotation>
							<xsd:documentation>The immersion medium the lens is designed for</xsd:documentation>
						</xsd:annotation>
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="Oil"/>
								<xsd:enumeration value="Water"/>
								<xsd:enumeration value="WaterDipping"/>
								<xsd:enumeration value="Air"/>
								<xsd:enumeration value="Multi"/>
								<xsd:enumeration value="Glycerol"/>
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
					<xsd:attribute name="LensNA" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The numerical aperture of the lens expressed as a floating point (real) number.
								Expected range 0.02 - 1.5 [units:none]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="NominalMagnification" use="optional" type="PositiveInt">
						<xsd:annotation>
							<xsd:documentation>
								The magnification of the lens as specified by the manufacturer - i.e. '60' is a 60X lens. [units:none]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="CalibratedMagnification" use="optional"  type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The magnification of the lens as measured by a calibration process- i.e. '59.987' for a 60X lens. [units:none]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="WorkingDistance" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The working distance of the lens expressed as a floating point (real) number. Units are microns[um].
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Iris" use="optional" type="xsd:boolean">
						<xsd:annotation>
							<xsd:documentation>
								Records whether or not the objective was fitted with an Iris. [flag]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Detector"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The type of detector used to capture the image.
				The Detector ID can be used as a reference within the Channel element in the Image element.
				
				Each attribute now has an indication of what type of detector
				it applies to. This is preparatory work for cleaning up and 
				possibly splitting this object into sub-types.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="ManufacturerSpec">
					<xsd:attribute name="Gain" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The Detector Gain for this detector, as a float. [units:none] {used:CCD,EMCCD,PMT}
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Voltage" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The Voltage of the detector (e.g. PMT voltage) as a float. volts[V] {used:PMT}
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Offset" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The Detector Offset. [units:none] {used:CCD,EMCCD}
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Zoom" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The Zoom or "Confocal Zoom" or "Scan Zoom" for a detector. [units:none] {used:PMT}
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="AmplificationGain" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								Gain applied to the detector signal. 
								This is the electronic gain (as apposed to the inherent gain) that is set for the detector. [units:none] {used:EMCCD#EMGain}
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="ID" use="required" type="DetectorID"/>
					<xsd:attribute name="Type" use="optional">
						<xsd:annotation>
							<xsd:documentation>
								The Type of detector. E.g. CCD, PMT, EMCCD etc.
							</xsd:documentation>
						</xsd:annotation>
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="CCD"/><!-- Charge-Coupled Device -->
								<xsd:enumeration value="IntensifiedCCD"/>
								<xsd:enumeration value="AnalogVideo"/>
								<xsd:enumeration value="PMT"/><!-- Photomultiplier tube -->
								<xsd:enumeration value="Photodiode"/>
								<xsd:enumeration value="Spectroscopy"/>
								<xsd:enumeration value="LifetimeImaging"/>
								<xsd:enumeration value="CorrelationSpectroscopy"/>
								<xsd:enumeration value="FTIR"/><!-- Fourier transform infrared spectroscopy -->
								<xsd:enumeration value="EMCCD"/><!-- Electron Multiplying Charge Coupled Device -->
								<xsd:enumeration value="APD"/><!-- Avalanche Photodiode -->
								<xsd:enumeration value="CMOS"/><!-- complementary metal oxide semiconductor -->
								<xsd:enumeration value="EBCCD"/><!-- electron-bombarded charge-coupled device -->
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<!-- Filter elements -->
	<xsd:element name="FilterSet"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>Filter set manufacturer specification</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="ManufacturerSpec">
					<xsd:sequence>
						<xsd:element name="ExcitationFilterRef" type="FilterRef" minOccurs="0" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>
									The Filters placed in the Excitation light path.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
						<xsd:element ref="DichroicRef" minOccurs="0" maxOccurs="1"/>
						<xsd:element name="EmissionFilterRef" type="FilterRef" minOccurs="0" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>
									The Filters placed in the Emission light path.
								</xsd:documentation>
							</xsd:annotation>
						</xsd:element>
					</xsd:sequence>
					<xsd:attribute name="ID" use="required" type="FilterSetID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Filter"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				A filter is either an excitation or emission filters.
				There should be one filter element specified per wavelength in the image.  
				The channel number associated with a filter set is specified in Channel.
				It is based on the FilterSpec type, so has the required attributes Manufacturer, Model, and LotNumber.
				It may also contain a Type attribute which may be set to
				'LongPass', 'ShortPass', 'BandPass', 'MultiPass',
				'Dichroic', 'NeutralDensity', or 'Other'.
				It can be associated with an optional FilterWheel - Note: this is not the same as a FilterSet
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="ManufacturerSpec">
					<xsd:sequence>
						<xsd:element ref="TransmittanceRange" minOccurs="0" maxOccurs="1"/>
					</xsd:sequence>
					<xsd:attribute name="Type" use="optional">
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="Dichroic"/>
								<xsd:enumeration value="LongPass"/>
								<xsd:enumeration value="ShortPass"/>
								<xsd:enumeration value="BandPass"/>
								<xsd:enumeration value="MultiPass"/>
								<xsd:enumeration value="NeutralDensity"/>
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
					<xsd:attribute name="FilterWheel" use="optional" type="xsd:string" >
						<xsd:annotation>
							<xsd:documentation>
								A filter 'wheel' in OME can refer to any arrangement of filters in a filter holder of any shape. It could, for example, be a filter slider. [plain text string]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="ID" use="required" type="FilterID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="TransmittanceRange"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This records the range of wavelengths that are transmitted by the filter. It also records the maximum amount of light transmitted.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="CutIn" use="optional" type="PositiveInt" >
				<xsd:annotation>
					<xsd:documentation>
						CutIn is the wavelength below which there is less than 50% transmittance for a filter. Units: nanometres[nm].
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="CutOut" use="optional" type="PositiveInt" >
				<xsd:annotation>
					<xsd:documentation>
						CutOut is the wavelength above which there is less than 50% transmittance for a filter. Units: nanometres[nm].
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="CutInTolerance" use="optional" type="NonNegativeInt" >
				<xsd:annotation>
					<xsd:documentation>
						CutInTolerance Units: nanometres[nm],
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="CutOutTolerance" use="optional" type="NonNegativeInt" >
				<xsd:annotation>
					<xsd:documentation>
						CutOutTolerance Units: nanometres[nm],
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Transmittance" use="optional" type="PercentFraction" >
				<xsd:annotation>
					<xsd:documentation>
						The amount of light the filter transmits at a maximum [units:none]
						A fraction, as a value from 0.0 to 1.0.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Dichroic"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>The dichromatic beamsplitter or dichroic mirror used for this filter combination.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="ManufacturerSpec">
					<xsd:attribute name="ID" use="required" type="DichroicID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="LightPath"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>A description of the light path</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ExcitationFilterRef" type="FilterRef" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation>
							The Filters placed in the Excitation light path.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="DichroicRef" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="EmissionFilterRef" type="FilterRef" minOccurs="0" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation>
							The Filters placed in the Emission light path.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="DichroicRef">  <!-- top level definition -->
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="DichroicID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	
	<!-- Light elements -->
	<xsd:element name="LightSource"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:appinfo>abstract-proprietary</xsd:appinfo>
			<xsd:documentation>
				The lightsource for the instrument.  An instrument may have several light sources.
				The type of lightsource is specified by one of the child-elements which are 'Laser', 'Filament', 'Arc' or 'LightEmittingDiode'.
				Each of the light source types has its own Type attribute to further differentiate the light source
				(eg, Nd-YAG for Laser or Hg for Arc).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="ManufacturerSpec">
					<xsd:choice minOccurs="1" maxOccurs="1">
						<xsd:element ref="Laser" minOccurs="1" maxOccurs="1"/>
						<xsd:element ref="Filament" minOccurs="1" maxOccurs="1"/>
						<xsd:element ref="Arc" minOccurs="1" maxOccurs="1"/>
						<xsd:element ref="LightEmittingDiode" minOccurs="1" maxOccurs="1"/>
					</xsd:choice>
					<xsd:attribute name="ID" use="required" type="LightSourceID">
						<xsd:annotation>
							<xsd:documentation>
								A LightSource ID must be specified for each light source, and the individual 
								light sources can be referred to by their LightSource IDs (eg from Channel).
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Power" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The light-source power. units milliwatts[mW]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Laser"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				Laser types are specified using two attributes - the Type and the LaserMedium.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="Pump" minOccurs="0" maxOccurs="1">
					<xsd:annotation>
						<xsd:documentation>
							The Laser element may contain a Pump sub-element which refers to
							a LightSource used as a laser pump.
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
			<xsd:attribute name="Type" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						Type is the general category of laser.  
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="Excimer"/>
						<xsd:enumeration value="Gas"/>
						<xsd:enumeration value="MetalVapor"/>
						<xsd:enumeration value="SolidState"/>
						<xsd:enumeration value="Dye"/>
						<xsd:enumeration value="Semiconductor"/>
						<xsd:enumeration value="FreeElectron"/>
						<xsd:enumeration value="Other"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="LaserMedium" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						The Medium attribute specifies the actual lasing medium
						for a given laser type.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<!-- MetalVaporLaserMedia -->
						<xsd:enumeration value="Cu"/>
						<xsd:enumeration value="Ag"/>
						<!-- ExcimerLaserMedia -->
						<xsd:enumeration value="ArFl"/>
						<xsd:enumeration value="ArCl"/>
						<xsd:enumeration value="KrFl"/>
						<xsd:enumeration value="KrCl"/>
						<xsd:enumeration value="XeFl"/>
						<xsd:enumeration value="XeCl"/>
						<xsd:enumeration value="XeBr"/>
						<!-- GasLaserMedia -->
						<xsd:enumeration value="N"/>
						<xsd:enumeration value="Ar"/>
						<xsd:enumeration value="Kr"/>
						<xsd:enumeration value="Xe"/>
						<xsd:enumeration value="HeNe"/>
						<xsd:enumeration value="HeCd"/>
						<xsd:enumeration value="CO"/>
						<xsd:enumeration value="CO2"/>
						<xsd:enumeration value="H2O"/>
						<xsd:enumeration value="HFl"/>
						<!-- SolidStateLaserMedia -->
						<xsd:enumeration value="NdGlass"/>
						<xsd:enumeration value="NdYAG"/>
						<xsd:enumeration value="ErGlass"/>
						<xsd:enumeration value="ErYAG"/>
						<xsd:enumeration value="HoYLF"/>
						<xsd:enumeration value="HoYAG"/>
						<xsd:enumeration value="Ruby"/>
						<xsd:enumeration value="TiSapphire"/>
						<xsd:enumeration value="Alexandrite"/>
						<!-- DyeLaserMedia -->
						<xsd:enumeration value="Rhodamine6G"/>
						<xsd:enumeration value="CoumarinC30"/>
						<!-- SemiconductorLaserMedia -->
						<xsd:enumeration value="GaAs"/>
						<xsd:enumeration value="GaAlAs"/>
						<!-- FreeElectronLaserMedia -->
						<xsd:enumeration value="EMinus"/>
						<!-- OtherLaserMedia -->
						<xsd:enumeration value="Other"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="Wavelength" use="optional" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>
						The Wavelength of the laser in nanometres[nm]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="FrequencyMultiplication" use="optional" type="PositiveInt">
				<xsd:annotation>
					<xsd:documentation>
						FrequencyMultiplication that may be specified. [units:none]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Tuneable" use="optional" type="xsd:boolean">
				<xsd:annotation>
					<xsd:documentation>
						Whether or not the laser is Tuneable [flag]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="Pulse" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						The Pulse mode of the laser.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="CW"/>
						<xsd:enumeration value="Single"/>
						<xsd:enumeration value="QSwitched"/>
						<xsd:enumeration value="Repetitive"/> 
						<xsd:enumeration value="ModeLocked"/>
						<xsd:enumeration value="Other"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="PockelCell" use="optional" type="xsd:boolean">
				<xsd:annotation>
					<xsd:documentation>
						If true the laser has a PockelCell to rotate the polarization of the beam. [flag]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="RepetitionRate" use="optional" type="xsd:float">
				<xsd:annotation>
					<xsd:documentation>
						The is the rate in Hz at which the laser pulses if 
						the Pulse type is 'Repetitive'. hertz[Hz]
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Arc"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The Arc element is used to describe various kinds of Arc lamps - Hg, Xe, HgXe.
				The Power of the Arc is now stored in the LightSource.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="Type" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						The type of Arc lamp.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="Hg"/>
						<xsd:enumeration value="Xe"/>
						<xsd:enumeration value="HgXe"/>
						<xsd:enumeration value="Other"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="Filament"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The Filament element is used to describe various kinds of filament bulbs such as Incadescent or Halogen.
				The Power of the Filament is now stored in the LightSource.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:attribute name="Type" use="optional">
				<xsd:annotation>
					<xsd:documentation>
						The type of filament.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="Incandescent"/>
						<xsd:enumeration value="Halogen"/>
						<xsd:enumeration value="Other"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="LightEmittingDiode"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The LightEmittingDiode element is used to describe
				various kinds of LED lamps.
				
				As the LightEmittingDiode is inside a LightSource it already has
				available the values from ManufacturerSpec 
				(Manufacturer, Model, SerialNumber, LotNumber)
				And the values from LightSource which includes Power in milliwatts
				
				We have looked at extending this element but have had a problem
				producing a generic solution.
				
				Possible attributes talked about adding include:
					Power in lumens - but this is complicated by multi-channel 
						devices like CoolLED where each channel's power is different
					Wavelength Range - not a simple value so would require 
						multiple attributes or a child element
					Angle of Projection - this would be further affected by the 
						optics used for filtering the naked LED or that combine 
						power from multiple devices
					
					These values are further affected if you over-drive the LED
					resulting in a more complex system
				
				Another issue is that LED's may not be used directly for 
				illumination but as drivers for secondary emissions from doped 
				fiber optics. This would require the fiber optics to be modeled.
				
				Thanks to Paul Goodwin of Applied Precision of information about
				this topic.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="Pump"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The Pump element is a reference to a LightSource.  It is used within the Laser element to specify the light source for the laser's pump (if any).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="LightSourceID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<!-- References -->
	<xsd:complexType name="Reference">
		<xsd:annotation>
			<xsd:appinfo>abstract</xsd:appinfo>
			<xsd:documentation>
				Reference is an empty complex type that is contained and extended by all the *Ref elements and also the Settings Complex Type
				Each *Ref element defines an attribute named ID of simple type *ID and no other information
				Each simple type *ID is restricted to the base type LSID with an appropriate pattern
			</xsd:documentation>
		</xsd:annotation>
	</xsd:complexType>
	
	<xsd:complexType name="FilterRef" > <!-- top level definition -->
		<xsd:complexContent>
			<xsd:extension base="Reference">
				<xsd:attribute name="ID" use="required" type="FilterID"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
	<xsd:element name="MicrobeamManipulationRef"> <!-- top level definition -->
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="MicrobeamManipulationID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>	
	<xsd:element name="ExperimentRef"> <!-- top level definition -->
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="ExperimentID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ChannelRef"> <!-- top level definition -->
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="ChannelID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ProjectRef"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				There may be one or more of these in a Dataset.
				This empty element has a required Project ID attribute that refers to Projects defined within the OME element.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="ProjectID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ExperimenterRef"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This empty element has a required Experimenter ID and an optional DocumentID attribute which refers to one of the Experimenters defined within OME.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="ExperimenterID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="GroupRef"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>This empty element has a reference (the Group ID attribute) to a Group defined within OME.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="GroupID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="InstrumentRef"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This empty element can be used (via the required Instrument ID attribute) to refer to an Instrument defined within OME.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="InstrumentID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="DatasetRef"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				The DatasetRef element refers to a Dataset by specifying the Dataset ID attribute.
				One or more DatasetRef elements may be listed within the Image element to specify what Datasets
				the Image belongs to.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="DatasetID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="FilterSetRef"> <!-- top level definition -->
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="FilterSetID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="OTFRef"> <!-- top level definition -->
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Reference">
					<xsd:attribute name="ID" use="required" type="OTFID"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<!-- Settings -->
	<xsd:complexType name="Settings">
		<xsd:annotation>
			<xsd:appinfo>abstract</xsd:appinfo>
			<xsd:documentation>
				Settings is an empty complex type that is contained and extended by all the *Settings elements
				Each *Settings element defines an attribute named ID of simple type *ID and the other information that is needed.
				Each simple type *ID is restricted to the base type LSID with an appropriate pattern
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="Reference">
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:element name="LightSourceSettings"> <!-- top level definition -->
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Settings">
					<xsd:attribute name="ID" use="required" type="LightSourceID"/>
					<xsd:attribute name="Attenuation" use="optional" type="PercentFraction">
						<xsd:annotation>
							<xsd:documentation>
								The Attenuation of the light source [units:none]
								A fraction, as a value from 0.0 to 1.0.
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Wavelength" use="optional" type="PositiveInt">
						<xsd:annotation>
							<xsd:documentation>
								The Wavelength of the light source. nanometres[nm]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="DetectorSettings"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				This holds the setting applied to a detector as well as a
				reference to the detector. 
				The ID is the detector used in this case.
				
				Each attribute now has an indication of what type of detector
				it applies to. This is preparatory work for cleaning up and 
				possibly splitting this object into sub-types.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Settings">
					<xsd:attribute name="ID" use="required" type="DetectorID"/>
					<xsd:attribute name="Offset" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The Offset of the detector. [units none] {used:CCD,EMCCD}
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Gain" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The Gain of the detector. [units:none] {used:CCD,EMCCD,PMT}
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Voltage" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The Voltage of the detector. volts[V] {used:PMT}
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="ReadOutRate" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The speed at which the detector can count pixels.  {used:CCD,EMCCD}
								Units of ReadOutRate is MHz. This is the bytes per second that 
								can be read from the detector (like a baud rate). megahertz[MHz]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Binning" use="optional">
						<xsd:annotation>
							<xsd:documentation>
								Represents the number of pixels that are combined to form larger pixels. {used:CCD,EMCCD}
							</xsd:documentation>
						</xsd:annotation>
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="1x1"/>
								<xsd:enumeration value="2x2"/>
								<xsd:enumeration value="4x4"/>
								<xsd:enumeration value="8x8"/>
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>	
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ObjectiveSettings"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation> 
				This holds the setting applied to an objective as well as a
				reference to the objective. 
				The ID is the objective used in this case.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="Settings">
					<xsd:attribute name="ID" use="required" type="ObjectiveID"/>
					<xsd:attribute name="CorrectionCollar" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The CorrectionCollar is it normal an adjustable ring on the 
								objective. Each has an arbitrary scale on it so the values 
								is unit-less. [units:none]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="Medium" use="optional">
						<xsd:simpleType>
							<xsd:annotation>
								<xsd:documentation>
									A description of a Medium used for the lens.
									The Medium is the actual immersion medium used in this case.
								</xsd:documentation>
							</xsd:annotation>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="Air"/>
								<xsd:enumeration value="Oil"/>
								<xsd:enumeration value="Water"/>
								<xsd:enumeration value="Glycerol"/>
								<xsd:enumeration value="Other"/>
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
					<xsd:attribute name="RefractiveIndex" use="optional" type="xsd:float">
						<xsd:annotation>
							<xsd:documentation>
								The RefractiveIndex is that of the immersion medium. This is
								a ratio so it also unit-less. [units:none]
							</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>
	
	<!-- ID types -->
	<xsd:simpleType name="LSID">
		<xsd:annotation>
			<xsd:documentation>
				Either LSID or internal consistent IDs for the file
				See: http://www.openmicroscopy.org/site/support/file-formats/working-with-ome-xml/id-and-lsid
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:\S+:\S+)|(\S+:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ProjectID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Project:\S+)|(Project:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="DatasetID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Dataset:\S+)|(Dataset:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ImageID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Image:\S+)|(Image:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ExperimenterID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Experimenter:\S+)|(Experimenter:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="GroupID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Group:\S+)|(Group:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ExperimentID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Experiment:\S+)|(Experiment:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="MicrobeamManipulationID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:MicrobeamManipulation:\S+)|(MicrobeamManipulation:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="InstrumentID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Instrument:\S+)|(Instrument:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ObjectiveID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Objective:\S+)|(Objective:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="LightSourceID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:LightSource:\S+)|(LightSource:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="DichroicID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Dichroic:\S+)|(Dichroic:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="FilterID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Filter:\S+)|(Filter:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="FilterSetID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:FilterSet:\S+)|(FilterSet:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="OTFID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:OTF:\S+)|(OTF:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="DetectorID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Detector:\S+)|(Detector:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="PixelsID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Pixels:\S+)|(Pixels:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ChannelID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Channel:\S+)|(Channel:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="ModuleID">
		<xsd:restriction base="LSID">
			<xsd:pattern value="(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:Module:\S+)|(Module:\S+)"/>
		</xsd:restriction>
	</xsd:simpleType>

</xsd:schema>

