<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:adx="http://xml.arrc.csiro.au/adx" targetNamespace="http://xml.arrc.csiro.au/adx" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.1">
	<!-- ==================================================== -->
	<annotation>
		<documentation> Description of analysis procedures 
		
2005-11-13

Copyright (c) 2006 CSIRO - see https://www.seegrid.csiro.au/twiki/bin/view/Xmml/LegalNotices#Software_Notice
</documentation>
	</annotation>
	<!-- ==================================================== -->
	<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
	<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="../../../../gml/trunk/gml/3.1.1/gmd/citation.xsd"/>
	<include schemaLocation="adxSpecimen.xsd"/>
	<include schemaLocation="LUTgeochemistry.xsd"/>
	<!-- ==================================================== -->
	<complexType name="ProcedureListType">
		<annotation>
			<documentation>A list of procedures.  
      Except where they are part of a suite, these may not be related to each other.  </documentation>
		</annotation>
		<sequence minOccurs="0" maxOccurs="unbounded">
			<choice>
				<element ref="adx:AssaySpecimenPreparation"/>
				<element ref="adx:AnalyteProcedure"/>
				<element ref="adx:AnalyteSuite"/>
			</choice>
		</sequence>
		<attribute name="count" type="adx:count"/>
	</complexType>
	<!-- ==================================================== -->
	<complexType name="ProcedurePropertyType">
		<annotation>
			<documentation>Description of a procedure or pointer to one.  </documentation>
		</annotation>
		<sequence minOccurs="0">
			<choice>
				<element ref="adx:AssaySpecimenPreparation"/>
				<element ref="adx:AnalyteProcedure"/>
				<element ref="adx:AnalyteSuite"/>
			</choice>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ==================================================== -->
	<complexType name="AnalyteSuiteType">
		<annotation>
			<documentation>A set of analyte procedures comprising a suite.  
      The members may be described inline, or may be references to procedures stored elsewhere either in the current document or remotely.  </documentation>
		</annotation>
		<complexContent>
			<!--
			<extension base="adx:ADXnamedObjectType">
			-->
			<extension base="gml:DefinitionType">
				<sequence>
					<element name="procedureCount" type="adx:count"/>
					<element name="procedureMember" type="adx:AnalyteProcedurePropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<element name="comment" type="string" minOccurs="0"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ........................................................................ -->
	<element name="AnalyteSuite" type="adx:AnalyteSuiteType"/>
	<!-- ==================================================== -->
	<!-- ==================================================== -->
	<complexType name="AnalyteProcedureType">
		<annotation>
			<documentation>The analyte procedure element is specific to an analyte/method pair of analysis to be performed on the submitted specimens within the envelope</documentation>
		</annotation>
		<complexContent>
			<!--
			<extension base="adx:ADXnamedObjectType">
			-->
			<extension base="gml:DefinitionType">
				<sequence>
					<element name="analyte" type="adx:analyteCode">
						<annotation>
							<documentation>The analyte species.</documentation>
						</annotation>
					</element>
					<element name="code" type="token" minOccurs="0">
						<annotation>
							<documentation>An optional code assigned at the discretion of the provider to identify the procedure.   </documentation>
						</annotation>
					</element>
					<element name="method" type="adx:analyticalMethodCode">
						<annotation>
							<documentation>The laboratory analysis process</documentation>
						</annotation>
					</element>
					<choice>
						<annotation>
							<documentation>If the value of the method property is "calculated" choose "calculation", else provide the specified parameters "massAnalysed", etc</documentation>
						</annotation>
						<element name="calculation" type="string">
							<annotation>
								<documentation>An expression to build a result based on other results, e.g. total Fe based on measurements of Fe2O3 + Fe3O4, etc.  </documentation>
							</annotation>
						</element>
						<sequence>
							<element name="massAnalysed" type="gml:MeasureType">
								<annotation>
									<documentation>Analytical sample weight</documentation>
								</annotation>
							</element>
							<element name="aliquotVolume" type="gml:MeasureType" minOccurs="0">
								<annotation>
									<documentation>This is used for the representing the laboratory extracted aliquot volume for the specimen in requiring analysis. This value may be referenced as a default for catch weigh LIMS systems.  E.g. 10</documentation>
								</annotation>
							</element>
							<element name="dilutionFactor" type="decimal" default="1.0" minOccurs="0">
								<annotation>
									<documentation>The procedure may involve diluting the specimen by a certain factor in order to bring the result within the detection range of the instrument.  A standard dilution may be used as part of some procedures.  However, dilution usually happens on a per-specimen/per-analyte basis, so is more often recorded as part of the Analysis element.  Note, however, that the dilution factor is always provided for information only, and the numeric value of the result always represents the "true" value, with the correction due to dilution already applied.  </documentation>
								</annotation>
							</element>
							<element name="lowerDetectionLimit" type="gml:MeasureType">
								<annotation>
									<documentation>The lower detection limit for the given method for this analyte. </documentation>
								</annotation>
							</element>
							<element name="upperDetectionLimit" type="gml:MeasureType">
								<annotation>
									<documentation>The upper detection limit for the given method for this analyte. </documentation>
								</annotation>
							</element>
							<element name="secondUpperDetectionLimit" type="gml:MeasureType" minOccurs="0">
								<annotation>
									<documentation>Some procedures may have a secondary upper detection limit for the given method for this analyte.  Results may be reported with values between the primary and secondary upper detection limits that have reduced accuracy.  </documentation>
								</annotation>
							</element>
							<element name="primaryDigestion" type="token">
								<annotation>
									<documentation>Primary digestion procedure for this analyte/method.  </documentation>
								</annotation>
							</element>
							<element name="secondaryExtraction" type="token" minOccurs="0">
								<annotation>
									<documentation>Secondary leach, organic extraction or concentration procedure for this analyte/method.  </documentation>
								</annotation>
							</element>
							<element name="deliveryMethod" type="token" minOccurs="0">
								<annotation>
									<documentation>Specialized method of delivery to analytical equipment: e.g. Hydride.  </documentation>
								</annotation>
							</element>
						</sequence>
					</choice>
					<!--
					<element ref="adx:operator" minOccurs="0">
					-->
					<element name="operator" type="gmd:CI_ResponsibleParty_PropertyType" minOccurs="0">
						<annotation>
							<documentation>The party responsible for performing the procedure and/ or specific laboratory location.</documentation>
						</annotation>
					</element>
					<element name="comment" type="string" minOccurs="0"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ........................................................................ -->
	<element name="AnalyteProcedure" type="adx:AnalyteProcedureType"/>
	<!-- ........................................................................ -->
	<complexType name="AnalyteProcedurePropertyType">
		<sequence minOccurs="0">
			<element ref="adx:AnalyteProcedure"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ==================================================== -->
	<!-- ==================================================== -->
</schema>

