<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by ICT (Stichting Deltares) -->
<!--Delft FEWS (Copyright 2003 WL | Delft Hydraulics) -->
<schema xmlns:fews="http://www.wldelft.nl/fews" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wldelft.nl/fews" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<include schemaLocation="sharedTypes.xsd"/>
	<element name="customFlagSources" type="fews:CustomFlagSourcesComplexType">
		<annotation>
			<documentation>Predefined flag sources to be used as custom flag source. A flag source indicates the reason for the latest update of a flag in the timeseries. By using a custom flag source it can be more accurately be tracked down what action caused the flag to be doubtful or unreliable. Custom flag sources can be defined by the configurator and for instance be used in some secondary validation checks to indicate the reason for altering a flag. The value of the flag attribute (100-255) is actually written to the timeseries in the database. Once a flag is written to the database it is intended that the use of this flag number remains fixed forever whereas the id, name and description can be edited.
			</documentation>
		</annotation>
		<key name="uniqueFlag">
			<selector xpath="fews:customFlagSource"/>
			<field xpath="@flag"/>
		</key>
		<key name="uniqueId">
			<selector xpath="fews:customFlagSource"/>
			<field xpath="@id"/>
		</key>
	</element>
	<simpleType name="customFlagSourceIntType">
		<restriction base="integer">
			<minInclusive value="100"/>
			<maxInclusive value="255"/>
		</restriction>
	</simpleType>
	<complexType name="CustomFlagSourcesComplexType">
		<annotation>
			<documentation>Predefined custom flag source.</documentation>
		</annotation>
		<sequence maxOccurs="unbounded">
			<element name="customFlagSource" type="fews:CustomFlagSourceComplexType"/>
		</sequence>
	</complexType>
	<complexType name="CustomFlagSourceComplexType">
		<sequence>
			<element name="description" type="string" minOccurs="0">
				<annotation>
					<documentation>Optional description of this custom flag source. This is not used and is only present for convenience.</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="id" type="fews:idStringType" use="required">
			<annotation>
				<documentation>Identifier for the custom flag source. It is recommended that this field is similarly to FlagSource id a very brief (2-3 uppercase alphabetic characters).</documentation>
			</annotation>
		</attribute>
		<attribute name="name" type="fews:nameStringType" use="optional">
			<annotation>
				<documentation>Short name for the custom flag source to be displayed, if not available id is used.</documentation>
			</annotation>
		</attribute>
		<attribute name="flag" type="fews:customFlagSourceIntType" use="required">
			<annotation>
				<documentation>Actual value of the custom flag source that is to be written to the timeseries in the database. Should be within range 100-255. Once chosen and in the timeseries of the database,  it should not be changed or reused for a different kind of purpose.</documentation>
			</annotation>
		</attribute>
	</complexType>
</schema>
