<?xml version="1.0" encoding="UTF-8"?>
<schema 
xmlns="http://www.w3.org/2001/XMLSchema"  
xmlns:sch="http://purl.oclc.org/dsdl/schematron"  
xmlns:om="http://www.opengis.net/om/1.0"
xmlns:omx="http://www.opengis.net/omx/1.0"
xmlns:cv="http://www.opengis.net/cv/0.2.1"
		  targetNamespace="http://www.opengis.net/omx/1.0"
        elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1">
	<annotation>
		<appinfo source="urn:ogc:specification:om:doc-is(07-022r3):1.0.0">
			<sch:title>Schematron validation</sch:title>
			<sch:ns prefix="omx" uri="http://www.opengis.net/omx/1.0"/>
			<sch:ns prefix="om" uri="http://www.opengis.net/om/1.0"/>
			<sch:ns prefix="cv" uri="http://www.opengis.net/cv/0.2.1"/>
		</appinfo>
		<documentation>observationCoverageCompact.xsd

An implementation of the OandM model for SWE
This document contains specializations of the basic observation pattern, fixing the type of the result to be various discrete coverage types (compact version). 

In this schema, the derivation model is **restriction**

Observation Extensions is an OGC Standard.
Copyright (c) 2007,2008,2010 Open Geospatial Consortium, Inc. All Rights Reserved.
To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
		</documentation>
	</annotation>
	<!-- ====================================================================== -->
	<!-- bring in other schemas -->
	<import namespace="http://www.opengis.net/cv/0.2.1" schemaLocation="http://bp.schemas.opengis.net/06-188r1/cv/0.2.1/cv.xsd"/>	
	<import namespace="http://www.opengis.net/om/1.0"  schemaLocation="http://schemas.opengis.net/om/1.0.0/om.xsd"/>
	<!-- ====================================================================== -->
	<!-- ====================================================================== -->
	<!-- === Compact coverage observations = implement the "geometry" element in the result in compact form === -->
	<!-- ====================================================================== -->
	<element name="DiscreteCoverageObs" type="om:ObservationType" substitutionGroup="om:Observation">
		<annotation>
			<appinfo>
				<sch:pattern name="result must contain a cv:CompactDiscreteCoverage and nothing else">
					<sch:rule context="//omx:DiscreteCoverageObs">
						<sch:assert test="om:result/cv:CompactDiscreteCoverage">cv:CompactDiscreteCoverage must be present as child of om:result</sch:assert>
						<sch:assert test="count(om:result/*) = 1">one and only one child element must be present</sch:assert>
				</sch:rule>
				</sch:pattern>
			</appinfo>
			<documentation>Specialized Observation, in which the result is a compact representation of a generalized discrete coverage</documentation>
		</annotation>
	</element>
	<!-- ====================================================================== -->
	<element name="PointCoverageObs" type="om:ObservationType" substitutionGroup="om:Observation">
		<annotation>
			<appinfo>
				<sch:pattern name="result must contain a cv:CompactDiscretePointCoverage and nothing else">
					<sch:rule context="//omx:PointCoverageObs">
						<sch:assert test="om:result/cv:CompactDiscretePointCoverage">cv:CompactDiscretePointCoverage must be present as child of om:result</sch:assert>
						<sch:assert test="count(om:result/*) = 1">one and only one child element must be present</sch:assert>
				</sch:rule>
				</sch:pattern>
			</appinfo>
			<documentation>Observation event</documentation>
		</annotation>
	</element>
	<!-- ====================================================================== -->
	<element name="TimeSeriesObs" type="om:ObservationType" substitutionGroup="om:Observation">
		<annotation>
			<appinfo>
				<sch:pattern name="result must contain a cv:CompactDiscreteTimeCoverage and nothing else">
					<sch:rule context="//omx:TimeSeriesObs">
						<sch:assert test="om:result/cv:CompactDiscreteTimeCoverage">cv:CompactDiscreteTimeCoverage must be present as child of om:result</sch:assert>
						<sch:assert test="count(om:result/*) = 1">one and only one child element must be present</sch:assert>
				</sch:rule>
				</sch:pattern>
			</appinfo>
			<documentation>Specialized Observation, in which the result is a compact representation of a time-instant coverage which samples a property of the feature of interest at different times</documentation>
		</annotation>
	</element>
	<!-- ====================================================================== -->
</schema>
