<?xml version="1.0" encoding="UTF-8"?>
<!--Delft FEWS (Copyright 2003 WL | Delft Hydraulics) -->
<schema xmlns:fews="http://www.wldelft.nl/fews/PI" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wldelft.nl/fews/PI" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<include schemaLocation="pi_sharedtypes.xsd"/>
    <element name="timeseriesparameters" type="fews:TimeSeriesParametersComplexType"/>
    <complexType name="TimeSeriesParametersComplexType">
        <sequence>
            <element name="parameter" type="fews:TimeSeriesParameterComplexType" minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
        <attribute name="version" type="fews:versionString" default="1.9"/>
    </complexType>
    <complexType name="TimeSeriesParameterComplexType">
		<sequence>
			<element name="name" type="string" minOccurs="0"/>
            <element name="shortName" type="string" minOccurs="0"/>
            <element name="parameterType" type="fews:parameterTypeEnum"/>
            <element name="unit" type="fews:unitStringType">
                <annotation>
                    <documentation>The unit of the values internally stored in the data store. By specifying a display unit you can use another unit seen by the user
                    </documentation>
                </annotation>
            </element>
            <element name="displayUnit" type="fews:unitStringType" minOccurs="0">
                <annotation>
                    <documentation>Specify when the unit seen by the user is not the same as the unit of the values internally stored in the data store. Also specify
                        displayUnitConversionsId above as first element in this config file. In this unit conversions the conversion from (internal) unit to display unit should be available
                    </documentation>
                </annotation>
            </element>            
            <element name="usesDatum" type="boolean" default="false" minOccurs="0"/>
            <group ref="fews:AttributesSequence" minOccurs="0">
                <annotation>
                    <documentation>Since 2021.02. Parameter attributes</documentation>
                </annotation>
            </group>
        </sequence>
        <attribute name="id" type="fews:idString" use="required"/>
        <attribute name="parameterGroup" type="fews:idString">
            <annotation>
                <documentation>Since 2018.01 parameterGroup added as attribute to parameter element</documentation>
            </annotation>
        </attribute>
        <attribute name="parameterGroupName" type="fews:idString">
            <annotation>
                <documentation>Since 2022.02 parameterGroupName added as attribute to parameter element</documentation>
            </annotation>
        </attribute>
    </complexType>
    <simpleType name="unitEnumStringType">
        <restriction base="string">
            <enumeration value="m"/>
            <enumeration value="m2"/>
            <enumeration value="m3"/>
            <enumeration value="mm"/>
            <enumeration value="m/s"/>
            <enumeration value="m2/s"/>
            <enumeration value="m3/s"/>
            <enumeration value="mm/hr"/>
            <enumeration value="K"/>
            <enumeration value="oC"/>
            <enumeration value="%"/>
            <enumeration value="g"/>
            <enumeration value="s"/>
            <enumeration value="degrees"/>
            <enumeration value="Bft"/>
            <enumeration value="-"/>
            <enumeration value="W/m2"/>
            <enumeration value="Pa"/>
            <enumeration value="N"/>
            <enumeration value="Hz"/>
            <enumeration value="kg/m3"/>
            <enumeration value="m3/kg"/>
            <enumeration value="1/m"/>
            <enumeration value="rad"/>
            <enumeration value="pH"/>
        </restriction>
    </simpleType>
    <simpleType name="parameterTypeEnum">
        <restriction base="string">
            <enumeration value="instantaneous"/>
            <enumeration value="accumulative"/>
            <enumeration value="mean"/>
        </restriction>
    </simpleType>
    <simpleType name="unitStringType">
        <union memberTypes="fews:unitEnumStringType string"/>
    </simpleType>
</schema>
