<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:test="http://CytometryML/Schemas/units_test" targetNamespace="http://CytometryML/Schemas/units_test" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<annotation>
		<documentation>Inheritance by restriction only works if elementFormDefault = unqualified  
in both the parent and the child of complexTypes</documentation>
	</annotation>
	<!--xxxxxxxx Prefix Types xxxxxxxxxxxxxxxxxxxxx-->
	<annotation>
		<documentation>This is the prefix name according to the UCUM XML file.</documentation>
	</annotation>
	<simpleType name="Prefix_Name_Type" id="Prefix_Name_Type">
		<restriction base="string">
			<enumeration value=""/>
			<enumeration value="yotta"/>
			<enumeration value="zetta"/>
			<enumeration value="exa"/>
			<enumeration value="peta "/>
			<enumeration value="tera"/>
			<enumeration value="giga "/>
			<enumeration value="mega"/>
			<enumeration value="kilo"/>
			<enumeration value="hecto"/>
			<enumeration value="deka"/>
			<enumeration value="deci "/>
			<enumeration value="centi"/>
			<enumeration value="milli"/>
			<enumeration value="micro"/>
			<enumeration value="nano"/>
			<enumeration value="pico"/>
			<enumeration value="femto"/>
			<enumeration value="atto"/>
			<enumeration value="zepto"/>
			<enumeration value="yocto"/>
			<enumeration value="kibi"/>
			<enumeration value="mebi"/>
			<enumeration value="gibi"/>
			<enumeration value="tebi"/>
			<!--No prefix-->
		</restriction>
	</simpleType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<simpleType name="Print_Type" id="Print_Type">
		<restriction base="string">
			<enumeration value=""/>
			<enumeration value="Y"/>
			<enumeration value="Z"/>
			<enumeration value="E"/>
			<enumeration value="P"/>
			<enumeration value="T"/>
			<enumeration value="G"/>
			<enumeration value="M"/>
			<enumeration value="k"/>
			<enumeration value="h"/>
			<enumeration value="da"/>
			<enumeration value="d"/>
			<enumeration value="c"/>
			<enumeration value="m"/>
			<enumeration value="u"/>
			<enumeration value="n"/>
			<enumeration value="p"/>
			<enumeration value="f"/>
			<enumeration value="a"/>
			<enumeration value="z"/>
			<enumeration value="y"/>
			<enumeration value="Ki"/>
			<enumeration value="Mi"/>
			<enumeration value="Gi"/>
			<enumeration value="Ti"/>
			<!--No prefix-->
		</restriction>
	</simpleType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<simpleType name="Case_Insen_Type" id="Case_Insen_Type">
		<restriction base="string">
			<enumeration value=""/>
			<enumeration value="YA"/>
			<enumeration value="ZA"/>
			<enumeration value="EX"/>
			<enumeration value="PT"/>
			<enumeration value="TR"/>
			<enumeration value="GA"/>
			<enumeration value="MA"/>
			<enumeration value="K"/>
			<enumeration value="H"/>
			<enumeration value="DA"/>
			<enumeration value="D"/>
			<enumeration value="C"/>
			<enumeration value="M"/>
			<enumeration value="U"/>
			<enumeration value="N"/>
			<enumeration value="P"/>
			<enumeration value="F"/>
			<enumeration value="A"/>
			<enumeration value="ZO"/>
			<enumeration value="YO"/>
			<enumeration value="KIB"/>
			<enumeration value="MIB"/>
			<enumeration value="GIB"/>
			<enumeration value="TIB"/>
			<!--No prefix-->
		</restriction>
	</simpleType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<simpleType name="Case_Sen_Type" id="Case_Sen_Type">
		<restriction base="string">
			<enumeration value=""/>
			<enumeration value="Y"/>
			<enumeration value="Z"/>
			<enumeration value="E"/>
			<enumeration value="P"/>
			<enumeration value="T"/>
			<enumeration value="G"/>
			<enumeration value="M"/>
			<enumeration value="k"/>
			<enumeration value="h"/>
			<enumeration value="da"/>
			<enumeration value="d"/>
			<enumeration value="c"/>
			<enumeration value="m"/>
			<enumeration value="&#x03BC;"/>
			<enumeration value="n"/>
			<enumeration value="p"/>
			<enumeration value="f"/>
			<enumeration value="a"/>
			<enumeration value="z"/>
			<enumeration value="y"/>
			<enumeration value="Ki"/>
			<enumeration value="Mi"/>
			<enumeration value="Gi"/>
			<enumeration value="Ti"/>
			<!--No prefix-->
		</restriction>
	</simpleType>
	<!--xxxxxxxxEnd Prefix types xxxxxxxxxxxxxx-->
	<annotation>
		<documentation>Pdf page 13 , Table 4: SI units p.15 and 		
Table 5:Other units from ISO 1000, ISO 2955, and some from ANSI X3.50. p16.</documentation>
	</annotation>
	<simpleType name="Unit_Abbreviations_Type">
		<restriction base="token">
			<enumeration value="A"/>
			<enumeration value="C"/>
			<enumeration value="cd"/>
			<enumeration value="g"/>
			<enumeration value="Hz"/>
			<enumeration value="K"/>
			<enumeration value="l"/>
			<enumeration value="lx"/>
			<enumeration value="m"/>
			<enumeration value="mol"/>
			<enumeration value="mol/l"/>
			<enumeration value="°C"/>
			<enumeration value="Pa"/>
			<enumeration value="rad"/>
			<enumeration value="s"/>
			<enumeration value="V"/>
			<enumeration value="W"/>
		</restriction>
	</simpleType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<annotation>
		<documentation>OMAC HMI Data Type Overview using W3C XML and STEP. This document responds to the action item 
	from the May 23, 2001 OMAC HMI meeting:
Review and compile a list of W3C XML Schema data types and STEP data types 
that can be applied to OMAC XML Schema (Reference of starting data type) _ 
John M. July 31. and Unum. However all lower case. Unum is the base for terms</documentation>
	</annotation>
	<simpleType name="Si_Unit_Name_Type">
		<restriction base="string">
			<enumeration value="ampere"/>
			<enumeration value="becquerel"/>
			<enumeration value="candela"/>
			<enumeration value="celsius"/>
			<enumeration value="coulomb"/>
			<enumeration value="degree"/>
			<enumeration value="farad"/>
			<enumeration value="gram"/>
			<enumeration value="gray"/>
			<enumeration value="henry"/>
			<enumeration value="hertz"/>
			<enumeration value="joule"/>
			<enumeration value="kelvin"/>
			<enumeration value="lumen"/>
			<enumeration value="lux"/>
			<enumeration value="meter"/>
			<enumeration value="mole"/>
			<enumeration value="newton"/>
			<enumeration value="ohm"/>
			<enumeration value="pascal"/>
			<enumeration value="radian"/>
			<enumeration value="second"/>
			<enumeration value="siemens"/>
			<enumeration value="sievert"/>
			<enumeration value="steridian"/>
			<enumeration value="tesla"/>
			<enumeration value="volt"/>
			<enumeration value="watt"/>
			<enumeration value="weber"/>
		</restriction>
	</simpleType>
	<annotation>
		<documentation>From PDF file, page 10, Â§19.1 allows to limit the set of supported dimensions. 
		Most practically used units contain exponents of -4 to +4, some may contain -5, 
		such as hemodynamic resistance measured traditionally in 1 dyn Â· s/cm5. 
		Thus if memory is limited, 4 bit per component of the dimension vector could be sufficient. 
		Byte is the equivalent of a Signed_8_Type.</documentation>
	</annotation>
	<simpleType name="Unit_Exponant_Type">
		<restriction base="byte">
			<minInclusive value="-5"/>
			<maxInclusive value="5"/>
		</restriction>
	</simpleType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<complexType name="Unit_Name_Type">
		<choice>
			<element name="Si_Unit_Name" type="test:Si_Unit_Name_Type"/>
			<element name="Unit_Abbreviation" type="test:Unit_Abbreviations_Type"/>
		</choice>
	</complexType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<complexType name="Prefix_Type">
		<choice>
			<element name="Prefix_Name" type="test:Prefix_Name_Type"/>
			<element name="Prefix_Case_Sen" type="test:Case_Sen_Type"/>
		</choice>
	</complexType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<simpleType name="Tag_Type" id="Tag_Type">
		<restriction base="string">
			<pattern value="[0-9a-fA-Fx]{4},[0-9a-fA-F]{4}"/>
		</restriction>
	</simpleType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<annotation>
		<documentation>The DICOM Value Representations Table has the following fields:
	VR, Name, Definition, Character Repertoire, and Length of Value.
	The Value Representation is an enumerated type which includes
	a two letter abbreviation. 
	It is the data type or class of the DICOM element. Most of theValue Representations 
	are enumerated below. In the future, more can be added as needed.</documentation>
	</annotation>
	<simpleType name="VR_Type" id="VR_Type">
		<restriction base="string">
			<enumeration value="AE"/>
			<enumeration value="AS"/>
			<enumeration value="AT"/>
			<enumeration value="CS"/>
			<enumeration value="DA"/>
			<enumeration value="DS"/>
			<enumeration value="DT"/>
			<enumeration value="FL"/>
			<enumeration value="FD"/>
			<enumeration value="IS"/>
			<enumeration value="LO"/>
			<enumeration value="LT"/>
			<enumeration value="OW"/>
			<enumeration value="PN"/>
			<enumeration value="SQ"/>
			<enumeration value="SH"/>
			<enumeration value="SL"/>
			<enumeration value="SS"/>
			<enumeration value="ST"/>
			<enumeration value="TM"/>
			<enumeration value="UL"/>
			<enumeration value="US"/>
			<enumeration value="UT"/>
			<enumeration value="NT"/>
		</restriction>
	</simpleType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<simpleType name="Float64_Type">
		<restriction base="double"/>
	</simpleType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<!-- Offsets are never negative. At the present time, the maximum value is reasonable -->
	<simpleType name="Offset_Value_Type">
		<restriction base="test:Float64_Type">
			<minInclusive value="0.0"/>
			<maxInclusive value="250.0"/>
		</restriction>
	</simpleType>	
	<!--************************************-->
	<annotation>
		<documentation>This is a sequence with two choice elements with each 
	of the choice elements providing an abbreviation or a name. This is superior to the old version 0.02, where 
	the two choices were replaced 4 attributes, which considerably decreases the safety of this construct 
	and does not permit the units modifiers to be visable in a document. In order for it to be extensible 
	in child schemas, the Value element and the DICOM attributes had to be removed. These have to be added 
	in their final form to the extension.</documentation>
	</annotation>
	<complexType name="Scientific_Unit_Extensible_Type">
		<sequence>
			<choice>
				<element name="Prefix_Name" type="test:Prefix_Name_Type"/>
				<element name="Prefix_Case_Sen" type="test:Case_Sen_Type"/>
			</choice>
			<choice>
				<element name="Si_Unit_Name" type="test:Si_Unit_Name_Type"/>
				<element name="Unit_Abbreviation" type="test:Unit_Abbreviations_Type"/>
			</choice>
		</sequence>
	</complexType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<annotation>
		<documentation>Meter_Type illustrates that specific units can be created by extension of Units_Type</documentation>
	</annotation>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
	<complexType name="Meter_Type">
		<complexContent>
			<extension base="test:Scientific_Unit_Extensible_Type">
				<sequence>
					<element name="Value" type="double"/>
					<choice>
						<element name="Prefix_Name" type="test:Prefix_Name_Type"/>
						<element name="Prefix_Case_Sen" type="test:Case_Sen_Type"/>
					</choice>
					<choice>
						<element name="Si_Unit_Name" type="test:Si_Unit_Name_Type" fixed="meter"/>
						<element name="Unit_Abbreviation" type="test:Unit_Abbreviations_Type" fixed="m"/>
					</choice>
				</sequence>
				<attribute name="Tag" type="test:Tag_Type" use="optional"/>
				<attribute name="VR" type="test:VR_Type" use="optional"/>
			</extension>
		</complexContent>
	</complexType>
	<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->	
	<!--Inherits from Meter_Type. Offset_Type is in millimeters. Does NOT work.-->
	<complexType name="X_Offset_Type" id="X_Offset_Type">
		<complexContent>
			<restriction base="test:Meter_Type">
				<sequence>
					<element name="Value" type="double"/>
					<choice>
						<element name="Prefix_Name" type="test:Prefix_Name_Type" fixed="milli"/>
						<element name="Prefix_Case_Sen" type="test:Case_Sen_Type" fixed="m"/>
					</choice>
					<choice>
						<element name="Si_Unit_Name" type="test:Si_Unit_Name_Type" fixed="meter"/>
						<element name="Unit_Abbreviation" type="test:Unit_Abbreviations_Type" fixed="m"/>
					</choice>
				</sequence>
				<attribute name="Tag" type="test:Tag_Type" fixed="0040,072A"/>
				<attribute name="VR" type="test:VR_Type" fixed="DS"/>
			</restriction>
		</complexContent>
	</complexType>
</schema>
