<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema 
            xmlns:nwis="http://water.usgs.gov/XML/5.0"
            
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            id="Rating-3.0.a"
            elementFormDefault="qualified">

	<xsd:include schemaLocation="Shift.xsd"/>
	<xsd:include schemaLocation="RatingDate.xsd"/>
	<xsd:include schemaLocation="../shared/DataAgingCode.xsd"/>
	<xsd:include schemaLocation="../shared/RecordHistory.xsd"/>
	<xsd:include schemaLocation="../shared/curve/LinearCurve.xsd"/>
	<xsd:include schemaLocation="../shared/curve/LogCurve.xsd"/>
	<xsd:include schemaLocation="../shared/curve/StandardEquationCurve.xsd"/>
        <xsd:include schemaLocation="../shared/HistoryGroup.xsd"/>
	<xsd:element name="Rating">
		<xsd:annotation>
			<xsd:documentation>
				<Definition>A rating defines a relationship between two types of data. It is the instructions for transforming an independent variable to a dependent variable.</Definition>
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="RatingNumber" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The rating identification number.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="RatingCode" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The code that identifys the use of the rating.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element ref="DataAgingCode"/>
				<xsd:element name="TransportCode" type="xsd:string" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The code that identifys the type of unit values transport and is only used for conversion of input ratings.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Comment" type="xsd:string" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>Textual remarks about the rating.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
                                <xsd:group ref="HistoryGroup"/>
                   		<xsd:choice>
          				<xsd:element ref="LinearCurve" minOccurs="0"/>
          				<xsd:element ref="LogCurve" minOccurs="0"/>
          				<xsd:element ref="StandardEquationCurve" minOccurs="0"/>
        			</xsd:choice>
				<xsd:element ref="RatingDate" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element ref="Shift" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>
