<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.opengis.net/waterml/part2/1.0" xmlns:wmlrgs="http://www.opengis.net/waterml/part2/1.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:wml2="http://www.opengis.net/waterml/2.0" xmlns:om="http://www.opengis.net/om/2.0" version="1.0.0">
	<xs:annotation>
		<xs:documentation>
			WaterML 2.0 Part 2 is an OGC Standard.
			Copyright (c) 2015 Open Geospatial Consortium.
			To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .     
		</xs:documentation>
	</xs:annotation>
	<xs:include schemaLocation="gaugings.xsd"/>
	<xs:include schemaLocation="rangeValues.xsd"/>
	<xs:include schemaLocation="conversions.xsd"/>
	<xs:import namespace="http://www.opengis.net/om/2.0" schemaLocation="http://schemas.opengis.net/om/2.0/observation.xsd"/>
	<xs:import namespace="http://www.opengis.net/waterml/2.0" schemaLocation="http://schemas.opengis.net/waterml/2.0/waterml2.xsd"/>
	<xs:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
	<xs:annotation>
		<xs:documentation>The collection requirements class defines the top level collection that allows components of the part 2 model to be exchange together. It extends the WaterML2.0 part 1 collection type by adding support for conversion, gauging observations and cross-section observations. </xs:documentation>
	</xs:annotation>
	<xs:element name="Collection" type="wmlrgs:CollectionType" substitutionGroup="wml2:Collection">
		<xs:annotation>
			<xs:documentation>The Collection type is an extension of the part 1 collection. It has been extended to allow members of type Conversion, GaugingObservation, ConversionGroups, and CrossSectionObservations. </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="CollectionType">
		<xs:complexContent>
			<xs:extension base="wml2:CollectionType">
				<xs:sequence>
					<xs:element name="propertyPairMember" type="wmlrgs:PropertyPairPropertyType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>Members to allow local definition of property pairs, which group together two related properties. E.g. stage-flow. These can then be referenced for gauging observations. </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="rangeGroup" type="wmlrgs:RangeGroupPropertyType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>A range group member of the collection. </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="gaugingMember" type="om:OM_ObservationPropertyType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>A member of the collection that contains a specific gauging. </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="sectionMember" type="om:OM_ObservationPropertyType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>A member containing a cross-section instance. </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="conversionMember" type="wmlrgs:ConversionPropertyType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>A member of the collection that contains a specific conversion. </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="groupMember" type="wmlrgs:ConversionGroupPropertyType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>A member of the collection that contains a conversion group.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="CollectionPropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="wmlrgs:Collection"/>
		</xs:sequence>
		<xs:attributeGroup ref="gml:AssociationAttributeGroup"/>
		<xs:attributeGroup ref="gml:OwnershipAttributeGroup"/>
	</xs:complexType>
</xs:schema>
