<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://xml.arrc.csiro.au/adx" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0.1" xmlns:adx="http://xml.arrc.csiro.au/adx" xmlns:gml="http://www.opengis.net/gml" xmlns:xmml="http://www.opengis.net/xmml" xmlns:cil="urn:oasis:names:tc:ciq:xsdschema:xCIL:2.0" xmlns="http://www.w3.org/2001/XMLSchema">
	<!-- ==================================================== -->
	<annotation>
		<documentation> Description of analyses 
		
Copyright (c) 2004 CSIRO - see https://www.seegrid.csiro.au/twiki/bin/view/Xmml/LegalNotices#Software_Notice
</documentation>
	</annotation>
	<!-- ==================================================== -->
	<import namespace="http://www.opengis.net/xmml" schemaLocation="./xmml4adx.xsd"/>
	<include schemaLocation="adxBase.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>
	<!-- ==================================================== -->
	<element name="AnalysisBatch" type="adx:AnalysisBatchType"/>
	<!-- ==================================================== -->
	<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">
				<sequence>
					<element name="analysisCount" type="adx:count"/>
					<element name="analysisMember" minOccurs="0" maxOccurs="unbounded">
						<complexType>
							<sequence minOccurs="0">
								<choice>
									<element ref="adx:Analysis" maxOccurs="unbounded"/>
								</choice>
							</sequence>
							<attribute name="href" type="anyURI" use="optional">
								<annotation>
									<documentation>Identifier for the remote object</documentation>
								</annotation>
							</attribute>
						</complexType>
					</element>
					<element ref="adx:comment" minOccurs="0">
						<annotation>
							<documentation/>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ==================================================== -->
	<element name="Analysis" type="adx:AnalysisType"/>
	<!-- ==================================================== -->
	<complexType name="AnalysisType">
		<annotation>
			<documentation>Analysis provides the actual measured value for one analyte for a specimen. 
</documentation>
		</annotation>
		<complexContent>
			<extension base="adx:ADXobjectType">
				<sequence>
					<element name="purpose" type="xmml:assayPurposeCode" default="normal">
						<annotation>
							<documentation>Text indicating the purpose of this analysis.</documentation>
						</annotation>
					</element>
					<element name="relatedAnalysis" type="adx:relationship" 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="adx:referenceTo"/>
					<element name="analyteProcedure" type="adx:referenceTo"/>
					<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 ref="adx:time" 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 ref="adx:operator" 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:SoftTypedMeasureType">
									<annotation>
										<documentation>Numerical value determined for this analyte. </documentation>
									</annotation>
								</element>
								<element name="resultCode" type="adx:SoftTypedCategoryType">
									<annotation>
										<documentation>Numerical value determined for this analyte. </documentation>
									</annotation>
								</element>
							</choice>
							<element name="resultQuality" type="xmml: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="xmml:noAssayResultCode">
							<annotation>
								<documentation>No result available because LNR, etc</documentation>
							</annotation>
						</element>
					</choice>
					<element ref="adx:comment" 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>
	<!-- ==================================================== -->
</schema>

