<?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 analyses 
		
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="./adxBase.xsd"/>
	<include schemaLocation="./LUTgeochemistry.xsd"/>
	<!-- ==================================================== -->
	<complexType name="AnalysisListType">
		<annotation>
			<documentation>A list of analyses.  
      These need not be related to each other or part of a batch.  </documentation>
		</annotation>
		<sequence minOccurs="0" maxOccurs="unbounded">
			<choice>
				<element ref="adx:Analysis"/>
				<!--
        <element ref="adx:AnalysisBatch"/>
        -->
			</choice>
		</sequence>
		<attribute name="count" type="adx:count" use="required"/>
	</complexType>
	<!-- ==================================================== -->
	<complexType name="AnalysisBatchType">
		<annotation>
			<documentation>A set of analyses comprising a batch.  
      The members may be described inline, or may be references to analyses stored elsewhere either in the current document or remotely.  The order of the members is the order in which the analyses were performed, unless indicated otherwise.  </documentation>
		</annotation>
		<complexContent>
			<!--
			<extension base="adx:ADXobjectType">
			-->
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="analysisCount" type="adx:count"/>
					<element name="analysisMember" type="adx:AnalysisPropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<element name="comment" type="string" minOccurs="0">
						<annotation>
							<documentation/>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ........................................................................ -->
	<element name="AnalysisBatch" type="adx:AnalysisBatchType"/>
	<!-- ==================================================== -->
	<!-- ==================================================== -->
	<complexType name="AnalysisType">
		<annotation>
			<documentation>Analysis provides the actual measured value for one analyte for a specimen. 
</documentation>
		</annotation>
		<complexContent>
			<!--
			<extension base="adx:ADXobjectType">
			-->
			<extension base="gml:AbstractGMLType">
				<sequence>
					<element name="purpose" type="adx:assayPurposeCode" default="normal">
						<annotation>
							<documentation>Text indicating the purpose of this analysis.</documentation>
						</annotation>
					</element>
					<element name="relatedAnalysis" type="gml:ReferenceType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>The analysis cross reference axis allows analyses to be tied together, usually for QA/QC purposes.  For example, if this is a replicate then point to the original or other replicates.  </documentation>
						</annotation>
					</element>
					<element name="specimen" type="gml:ReferenceType"/>
					<element name="analyteProcedure" type="gml:ReferenceType"/>
					<element name="dilutionFactor" type="decimal" default="1.0" minOccurs="0">
						<annotation>
							<documentation>For high concentration specimens the procedure may be modified by diluting the specimen by a certain factor in order to bring the result within the detection range of the instrument.  This dilution happens on a per-specimen/per-analyte basis, so is recorded as part of the Analysis element.  Note, however, that the dilution factor is provided for information only, and the numeric value of the result represents the "true" value, with the correction due to dilution already applied.  </documentation>
						</annotation>
					</element>
					<element name="resultCount" type="adx:count" default="1" minOccurs="0">
						<annotation>
							<documentation>For some specimen/analyte the result is reported as an average of a set of measurements.  This element is used to report the number of measurements used to form the average.  </documentation>
						</annotation>
					</element>
					<element name="time" type="gml:TimePrimitivePropertyType" minOccurs="0">
						<annotation>
							<documentation>The period or instant during which analyses were performed; in the case of multiple measurements, with only a single measurement being reported</documentation>
						</annotation>
					</element>
					<element name="operator" type="gmd:CI_ResponsibleParty_PropertyType" minOccurs="0">
						<annotation>
							<documentation>The party responsible for performing the analysis (if different from that specified in the procedure)</documentation>
						</annotation>
					</element>
					<choice>
						<sequence>
							<choice>
								<element name="result" type="adx:TypedMeasureType">
									<annotation>
										<documentation>Numerical value determined for this analyte. </documentation>
									</annotation>
								</element>
								<element name="resultCode" type="adx:TypedCategoryType">
									<annotation>
										<documentation>Numerical value determined for this analyte. </documentation>
									</annotation>
								</element>
							</choice>
							<element name="resultQuality" type="adx:assayResultQualityCode" default="OK">
								<annotation>
									<documentation>Result determined for this analyte may need to be treated with caution for the reason indicated. </documentation>
								</annotation>
							</element>
						</sequence>
						<element name="noResult" type="adx:noAssayResultCode">
							<annotation>
								<documentation>No result available because LNR, etc</documentation>
							</annotation>
						</element>
					</choice>
					<element name="comment" type="string" minOccurs="0">
						<annotation>
							<documentation>The analysis note enables the operator to log any comments for this measured value.
E.g. Additional dilution due to high levels of sulphides 
</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ........................................................................ -->
	<element name="Analysis" type="adx:AnalysisType"/>
	<!-- ........................................................................ -->
	<complexType name="AnalysisPropertyType">
		<sequence minOccurs="0">
			<element ref="adx:Analysis"/>
		</sequence>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
	</complexType>
	<!-- ==================================================== -->
</schema>

