<?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="locationSets" type="fews:LocationSetsComplexType"/>
	<!--    -->
	<!--LocationSetComplex Type-->
	<complexType name="LocationSetComplexType">
		<sequence>
			<element name="description" type="string" minOccurs="0"/>
			<element name="skipDuplicateIds" type="boolean" default="false" minOccurs="0">
				<annotation>
					<documentation>Since FEWS 2026.01. If this option is set to true the rows with duplicate location ids are skipped in the listed main files (not the attribute files).</documentation>
				</annotation>
			</element>
			<sequence minOccurs="0" maxOccurs="unbounded">
				<element name="subLocationSetIdFunction" type="fews:idStringType">
					<annotation>
						<documentation>e.g. @catchment@. Generate a sub location set id for every unique location set id generated by the function.</documentation>
					</annotation>
				</element>
				<element name="subLocationSetNameFunction" type="fews:idStringType" minOccurs="0">
					<annotation>
						<documentation>e.g. @catchment@. Names of the generated location sets. First location in the generated location set is used to generate the name.</documentation>
					</annotation>
				</element>
			</sequence>
			<group ref="fews:SortingChoice" minOccurs="0">
				<annotation>
					<documentation>Effects the order of legend items, lists and columns in displays and reports.</documentation>
				</annotation>
			</group>
			<choice minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>A collection of locations. Can be build from other location sets, shape files or listing locations explicit
					or by only specifying constraints
					</documentation>
				</annotation>
				<element name="locationSetId" type="fews:idStringType">
					<annotation>
						<documentation>Add all the locations in the specified location set to this location set.
							When were constraints are specified only the locations that matching all the constraints are added
						</documentation>
					</annotation>
				</element>
				<element name="locationId" type="fews:idStringType"/>
				<element name="esriShapeFile" type="fews:LocationSetShapeFileComplexType">
					<annotation>
						<documentation>
							Loads locations from a shape file and adds these locations to the location set.
							When constraints are specified only locations that matching all the constraints are loaded.
							Use a different excluding constraints when locations from one shape
							file are loaded by different location sets
							For locationId, name,
							description, shortName, tooltip, parentLocationId and custom attributes
							you can reference the dbase file columns by putting the dbase column name between
							name) between %
						</documentation>
					</annotation>
				</element>
				<element name="geoJsonFile" type="fews:LocationSetGeoJSonComplexType">
					<annotation>
						<documentation>Loads locations from a geojson file and adds these locations to the location set. When constraints are specified only locations that matching all the constraints are loaded.
							Use a different excluding constraints when locations from one shape file are loaded by different location sets For locationId, name, description, shortName, tooltip, parentLocationId and custom attributes you can reference the attributes by putting the dbase column name between name) between %
						</documentation>
					</annotation>
				</element>
				<element name="geoPackageFile" type="fews:LocationSetGeoPackageComplexType">
					<annotation>
						<documentation>Loads locations from a gpkg file and adds these locations to the location set. When constraints are specified only locations that matching all the constraints
							are loaded.
							Use a different excluding constraints when locations from one shape file are loaded by different location sets For locationId, name, description, shortName, tooltip,
							parentLocationId and custom attributes you can reference the attributes by putting the dbase column name between name) between %
						</documentation>
					</annotation>
				</element>
				<element name="csvFile" type="fews:LocationSetCsvFileComplexType">
					<annotation>
						<documentation>Since 2013.01, FEWS-8714. Loads locations from a csv file and adds these locations to the location set. When constraints are specified only locations that matching all the constraints are loaded. Use a different excluding constraints when locations from one csv file are loaded by different location sets For locationId, name, description, shortName, tooltip, parentLocationId and custom attributes you can reference the dbase file columns by putting the csv column name between name) between %</documentation>
					</annotation>
				</element>
				<element name="table" type="fews:LocationSetDatabaseTableComplexType">
					<annotation>
						<documentation>
							Loads locations from a database table and adds these locations to the location set. When constraints are specified only locations that matching all the constraints are loaded. Use a different excluding constraints when locations from one shape file are loaded by different location sets For locationId, name, description, shortName, tooltip, parentLocationId and custom attributes you can reference the dbase file columns by putting the dbase column name between name) between %
						</documentation>
					</annotation>
				</element>
			</choice>
			<element name="constraints" type="fews:ConstraintsComplexType" minOccurs="0">
				<annotation>
					<documentation>Restriction for the locations in this location set. Only locations where for all the constraint is valid are included in this location set.
						It is a filter for the location sets and shape files specified above.
					</documentation>
				</annotation>
			</element>
			<element name="attributeFile" type="fews:AttributeFileComplexType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Links an extra attribute file to multiple parent tabular files. Useful for id maps and thresholds. These attributes can not be used in for constraints configured in
						this location set. Location set ids can not be listed when using this locationSet wide attribute file</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="id" type="fews:idStringType" use="required"/>
		<attribute name="name" type="fews:nameStringType" use="optional"/>
		<attribute name="editable" type="boolean">
			<annotation>
				<documentation>Set editable="true" to enable adding/removing locations to this locationSet in the ConfigEditor UI.</documentation>
			</annotation>
		</attribute>

	</complexType>
	<!---->
	<complexType name="LocationSetsComplexType">
		<sequence>
			<element name="allowEmptyLocationSets" type="boolean" minOccurs="0">
				<annotation>
					<documentation>Since 2018.01. If this element is set to false, an error will be logged if an empty location set is configured. By default FEWS will allow empty location sets and will only log a debug message.</documentation>
				</annotation>
			</element>
			<group ref="fews:PersistentIdsCsvFilesGroup" minOccurs="0"/>
			<element name="locationSet" type="fews:LocationSetComplexType" maxOccurs="unbounded">
				<key name="locationSet">
					<selector xpath="."/>
					<field xpath="@id"/>
				</key>
			</element>
		</sequence>
		<attribute name="version" type="fews:versionStringType" use="required" fixed="1.1"/>
	</complexType>
	<complexType name="LocationSetShapeFileComplexType">
		<sequence>
			<element name="file" type="fews:nonEmptyStringType">
				<annotation>
					<documentation>name of layer in the map layer files or a full absolute path to the shape file (*.shp).
					</documentation>
				</annotation>
			</element>
			<group ref="fews:geoDatumChoice" minOccurs="0"/>
			<element name="charset" type="fews:charsetEnumStringType" default="ISO-8859-1" minOccurs="0">
				<annotation>
					<documentation>Character set of the text in the dbf file. Specify only when the dbf file contains non western characters.
					</documentation>
				</annotation>
			</element>
			<group ref="fews:LocationSetTableSequence1"/>
			<group ref="fews:LocationSetTableXYSequence" minOccurs="0">
				<annotation>
					<documentation>When x and y are specified the shape file is optional and only the dbf is required. When x and y are not specified the coordinates are read from the shape file. When the shape file contains polygons the x and y are required
					</documentation>
				</annotation>
			</group>
			<group ref="fews:LocationSetTableSequence2"/>
			<element name="attributeFile" type="fews:AttributeFileComplexType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Links an extra csv or dbf file to the current shape file to import extra attributes. Optionally allows defining different values for different periods and multiple values (tables) per attribute
					</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<group name="geoDatumChoice">
		<sequence>
			<choice>
				<element name="geoDatum" type="fews:geoDatumStringType">
					<annotation>
						<documentation>Geo datum of the coordinates, default is lat long, WGS 1984
						</documentation>
					</annotation>
				</element>
				<element name="projectionFileAvailable" type="boolean">
					<annotation>
						<documentation>A projection file has the same name as the shp file, only the with extension .prj instead of .shp. A prj file can be used instead of specifying the geo datum.
							When false lat long, WGS 1984 will be used
						</documentation>
					</annotation>
				</element>
			</choice>
		</sequence>
	</group>
	<complexType name="LocationSetGeoJSonComplexType">
		<sequence>
			<element name="file" type="fews:nonEmptyStringType">
				<annotation>
					<documentation>name of layer in the map layer files to the geojson file (*.geojson).
					</documentation>
				</annotation>
			</element>
			<element name="shapeType" type="fews:shapeTypeEnumStringType">
				<annotation>
					<documentation>When the geojson file contains multiple shape types you can add the layer multiple times for each shape type</documentation>
				</annotation>
			</element>
			<group ref="fews:LocationSetTableSequence1"/>
			<group ref="fews:LocationSetTableXYSequence" minOccurs="0">
				<annotation>
					<documentation>When x and y are specified the shape file is optional and only the dbf is required. When x and y are not specified the coordinates are read from the shape file. When
						the shape file contains polygons the x and y are required
					</documentation>
				</annotation>
			</group>
			<group ref="fews:LocationSetTableSequence2"/>
			<element name="attributeFile" type="fews:AttributeFileComplexType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Links an extra csv or dbf file to the current shape file to import extra attributes. Optionally allows defining different values for different periods and multiple
						values (tables) per attribute
					</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="LocationSetGeoPackageComplexType">
		<sequence>
			<element name="file" type="fews:nonEmptyStringType">
				<annotation>
					<documentation>name of layer in the map layer files to the geojson file (*.geojson).
					</documentation>
				</annotation>
			</element>
			<element name="layerName" type="string" minOccurs="0">
				<annotation>
					<documentation>When the geojson file contains multiple layer you can can specify the layer name</documentation>
				</annotation>
			</element>
			<group ref="fews:LocationSetTableSequence1"/>
			<group ref="fews:LocationSetTableXYSequence" minOccurs="0">
				<annotation>
					<documentation>When x and y are specified the shape file is optional and only the dbf is required. When x and y are not specified the coordinates are read from the shape file. When
						the shape file contains polygons the x and y are required
					</documentation>
				</annotation>
			</group>
			<group ref="fews:LocationSetTableSequence2"/>
			<element name="attributeFile" type="fews:AttributeFileComplexType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Links an extra csv or dbf file to the current shape file to import extra attributes. Optionally allows defining different values for different periods and multiple
						values (tables) per attribute
					</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>

	<complexType name="LocationSetCsvFileComplexType">
		<sequence>
			<element name="file" type="fews:nonEmptyStringType">
				<annotation>
					<documentation>name of layer in the map layer files or a full absolute path to the csv file (*.csv).
					</documentation>
				</annotation>
			</element>
			<element name="readOnly" type="boolean" minOccurs="0">
				<annotation>
					<documentation>When the file is automatically overwritten by an external source</documentation>
				</annotation>
			</element>
			<group ref="fews:geoDatumChoice" minOccurs="0"/>
			<element name="charset" type="fews:charsetEnumStringType" default="ISO-8859-1" minOccurs="0">
				<annotation>
					<documentation>Character set of the text in the csv file. Specify only when the csv file contains non western characters.
					</documentation>
				</annotation>
			</element>
			<group ref="fews:LocationSetTableSequence1"/>
			<group ref="fews:LocationSetTableXYSequence" minOccurs="0"/>
			<group ref="fews:LocationSetTableSequence2"/>
			<element name="attributeFile" type="fews:AttributeFileComplexType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Links an extra csv file to the current shape file to import extra attributes. Optionally allows defining different values for different periods and multiple values (tables) per attribute
					</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<!---->
	<complexType name="LocationSetDatabaseTableComplexType">
		<sequence>
			<group ref="fews:databaseChoice">
				<annotation>
					<documentation>Database with the locations table</documentation>
				</annotation>
			</group>
			<element name="name" type="fews:ColumnDisplayNameAnnotatedIdType">
				<annotation>
					<documentation>
						Loads locations from this database table and adds these locations to the location set. When constraints are specified only locations that matching all the constraints are loaded. Use a different excluding constraints when locations from one shape file are loaded by different location sets For locationId, name, description, shortName, tooltip, parentLocationId and custom attributes you can reference the dbase file columns by putting the dbase column name between name) between %
					</documentation>
				</annotation>
			</element>
			<element name="geoDatum" type="fews:geoDatumStringType">
				<annotation>
					<documentation>Geo datum of the coordinates
					</documentation>
				</annotation>
			</element>
			<group ref="fews:LocationSetTableSequence1"/>
			<group ref="fews:LocationSetTableXYSequence"/>
			<group ref="fews:LocationSetTableSequence2"/>
			<element name="attributesTable" type="fews:AttributesTableComplexType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Links an table to the current table to import extra attributes. Optionally allows defining different values for different periods and multiple values (tables) per attribute
					</documentation>
				</annotation>
			</element>
			<element name="attributeFile" type="fews:AttributeFileComplexType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Since 2021.01. Links an csv or dbf file to the current database table to import extra attributes. Optionally allows defining different values for different periods and multiple
						values (tables) per attribute.
					</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<group name="LocationSetTableSequence1">
		<sequence>
			<element name="id" type="fews:ColumnDisplayNameAnnotatedIdType">
				<annotation>
					<documentation>ids of the locations in the shape file. e.g. "H_%ID%", put the actual column
						name between %%.
					</documentation>
				</annotation>
			</element>
			<element name="name" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>Names of the locations e.g. %NAME%, put the actual column name between %%</documentation>
				</annotation>
			</element>
			<element name="description" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>Long (descriptive) name of location (tool tip) or description. e.g. "Meteo station
						%NAME%,
						put the actual column name between %%
					</documentation>
				</annotation>
			</element>
			<element name="shortName" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>Short name of location for chart legend. e.g. %SHORT_NAME%, put the actual
						column name
						between %%
					</documentation>
				</annotation>
			</element>
			<element name="iconName" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>Filename of an image file in the IconFiles config directory (including file
						extension).
					</documentation>
				</annotation>
			</element>
			<element name="label" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>Label to be displayed on the map in  FewsExplorer. Besides the global properties and column names you can use the  virtual columns			%LAST_VALUE%, %LAST_VALUE_TIME%, et cetera (similar to toolTip)</documentation>
				</annotation>
			</element>
			<element name="toolTip" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>Tooltip to be displayed in the FewsExplorer.
						You can reference location attributes with @ATTRIBUTE_ID@ (Since 2013.02)
						You can reference csv/dbf columns without defining an attribute with %COLUMN_NAME%
						You can use use \n or CDATA or HTML when you need multiple lines.
						You can use the following variables
						%LAST_VALUE%, %LAST_VALUE_TIME%,
						%FORECAST_START_TIME%, %MAXIMUM_VALUE%, %MAXIMUM_VALUE_TIME%
						The tooltip supports html including images and hyperlinks.
						The url in the hyper link can be an internet url, an executable file, a document file, or a
						folder.
						Use the CDATA xml tag to include html in a xml file.
						By default the following tool tip is used.

						ID: id\n
						Name: name\n
						Desc: description
						Last value [%LAST_VALUE%] Time [%LAST_VALUE_TIME%]\n
						Forecast Start Time [%FORECAST_START_TIME%]\n
						Maximum [%MAXIMUM_VALUE%] Time [%MAXIMUM_VALUE_TIME%]
					</documentation>
				</annotation>
			</element>
			<element name="parentLocationId" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>When a location has a parent id it is an invisible child location.
						All the children of a location are automatically selected in the fews explorer
						e.g. H_%PARENT_ID%, put the actual column name
						between %%
					</documentation>
				</annotation>
			</element>
			<element name="timeZoneOffset" type="fews:timeZoneOffsetStringType" minOccurs="0">
				<annotation>
					<documentation>This offset is always relative to GMT. For example "+02:00" means GMT+02:00. If no offset specified, then time zone GMT is used by default.</documentation>
				</annotation>
			</element>
			<element name="dateTimePattern" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>Optional pattern for the dateTimes in the character column. Default is yyyyMMdd, this is the internal format a dbf file is using when the column is of type 'D'.</documentation>
				</annotation>
			</element>
			<choice minOccurs="0">
				<sequence>
					<element name="startDateTime" type="fews:nonEmptyStringType" minOccurs="0">
						<annotation>
							<documentation>Since 2014.01. e.g. %START_TIME%, put the actual column name between %%. When specified multiple rows with the same location id are allowed. The row is used for the specified period. The location is invisible for times when no row is applicable</documentation>
						</annotation>
					</element>
					<element name="endDateTime" type="fews:nonEmptyStringType" minOccurs="0">
						<annotation>
							<documentation>Since 2014.01. e.g. %END_TIME%, put the actual column name between %%. When specified multiple rows with the same location id are allowed. The row is used for the specified period. The location is invisible for times when no row is applicable</documentation>
						</annotation>
					</element>
					<element name="checkForContinuousPeriod" type="boolean" minOccurs="0" default="true">
						<annotation>
							<documentation>Since 2016.01. When true (default) errors will be logged for locations with time dependent attributes that have overlapping periods or gaps between periods
							</documentation>
						</annotation>
					</element>
				</sequence>
				<sequence>
					<element name="visibilityStartTime" type="fews:nonEmptyStringType" minOccurs="0">
						<annotation>
							<documentation>Deprecated and obsolete since 2014.01, use startDateTime. Optional start time of the period for which a location is visible in the user interface. The start time is inclusive. If not defined, then a location is visible for all times before end time. Possible to refer to a column. Use e.g. "%START_DATE% %START_TIME%", put the actual dbase column name between %%. When all the locations in the csv/dbf file are visible for the same period, specify a literal date time eg "2000/1/1".</documentation>
						</annotation>
					</element>
					<element name="visibilityEndTime" type="fews:nonEmptyStringType" minOccurs="0">
						<annotation>
							<documentation>Deprecated and obsolete since 2014.01, use endDateTime. Optional end time of the period for which a location is visible in the user interface. The end time is inclusive. If not defined, then a location is visible for all times after start time. Possible to refer to a column. Use e.g. "%END_DATE% %END_TIME%", put the actual column name between %%. When all the locations in the csv/dbf file are visible for the same period, specify a literal date time eg "2002/1/1".</documentation>
						</annotation>
					</element>
				</sequence>
			</choice>
		</sequence>
	</group>
	<group name="LocationSetTableXYSequence">
		<sequence>
			<element name="x" type="fews:ColumnDisplayNameAnnotatedIdType">
				<annotation>
					<documentation>X coordinate of the point (Easting). e.g. %X%, put the actual column name between %%.
					</documentation>
				</annotation>
			</element>
			<element name="y" type="fews:ColumnDisplayNameAnnotatedIdType">
				<annotation>
					<documentation>Y coordinate of the point (Northing) e.g. %Y%, put the actual column name between %%.
					</documentation>
				</annotation>
			</element>
		</sequence>
	</group>
	<group name="LocationSetTableSequence2">
		<sequence>
			<element name="z" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>Z coordinate of the point (altitude). e.g. %Z%, put the actual column name between %% The default z is 0
					</documentation>
				</annotation>
			</element>
			<element name="bedLevel" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>Since 2022.02.  %Bed_level%, put the actual column name between %%
					</documentation>
				</annotation>
			</element>
			<element name="layerSigmaCoordinate" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>Since 2017.02. Sigma coordinate of the layer. e.g. %Sigma%, put the actual column name between %%
					</documentation>
				</annotation>
			</element>
			<element name="area" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>The area of the location/polygon. e.g. %AREA%, put the actual column name between %%
					</documentation>
				</annotation>
			</element>
			<element name="relation" type="fews:LocationRelationComplexType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>Relation that can be used in time series sets. When a location relation is specified in a time series set the time series set locations are mapped to the related locations and these related locations are used to read/write the time series. e.g. "H_%UPSTREAM_ID%, put the actual column name between %%
					</documentation>
				</annotation>
			</element>
			<group ref="fews:AttributesSequence" minOccurs="0"/>
		</sequence>
	</group>
	<complexType name="AttributeFileComplexType">
		<sequence>
			<element name="description" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>
						Description
					</documentation>
				</annotation>
			</element>
			<choice>
				<sequence>
					<element name="csvFile" type="fews:nonEmptyStringType">
						<annotation>
							<documentation>name of csv file in the map layer files or a full absolute path to the csv file .

							</documentation>
						</annotation>
					</element>
					<element name="readOnly" type="boolean" minOccurs="0">
						<annotation>
							<documentation>When the file is automatically overwritten by an external source</documentation>
						</annotation>
					</element>
				</sequence>
				<sequence>
					<element name="esriShapeFile" type="fews:nonEmptyStringType">
						<annotation>
							<documentation>name of shp file in the map layer files
							</documentation>
						</annotation>
					</element>
					<group ref="fews:geoDatumChoice" minOccurs="0"/>
				</sequence>
				<sequence>
					<element name="geoJsonFile" type="fews:nonEmptyStringType">
						<annotation>
							<documentation>name of geojson file in the map layer files</documentation>
						</annotation>
					</element>
					<element name="shapeType" type="fews:shapeTypeEnumStringType">
						<annotation>
							<documentation>When the geojson file contains multiple shape types you can add the layer multiple times for each shape type</documentation>
						</annotation>
					</element>
					<element name="skipGeometry" type="boolean" minOccurs="0" default="false">
						<annotation>
							<documentation>When true, no geometry needs to be read. This can be useful when the geojson file is used in multiple places for different attributes.</documentation>
						</annotation>
					</element>
				</sequence>
				<sequence>
					<element name="geoPackageFile" type="fews:nonEmptyStringType">
						<annotation>
							<documentation>name of geojson file in the map layer files</documentation>
						</annotation>
					</element>
					<element name="skipGeometry" type="boolean" minOccurs="0" default="false">
						<annotation>
							<documentation>When true, no geometry needs to be read. This can be useful when the geopackage file is used in multiple places for different attributes.</documentation>
						</annotation>
					</element>
					<element name="layerName" type="string" minOccurs="0">
						<annotation>
							<documentation>When the file contains multiple layers the layer name should be specified</documentation>
						</annotation>
					</element>
				</sequence>
				<sequence>
					<element name="dbfFile" type="fews:nonEmptyStringType">
						<annotation>
							<documentation>name of dfb file in the map layer files or a full absolute path to the dbf file .</documentation>
						</annotation>
					</element>
				</sequence>
			</choice>
			<!--due a bug in castor a stack overflow occurs when we put ithe charset in the choice -->
			<element name="charset" type="fews:charsetEnumStringType" minOccurs="0">
				<annotation>
					<documentation>Character set of the text in the dbf file or csv file. Specify only when the csv file contains non- latin characters. Don't configure for geojson/gpkg files</documentation>
				</annotation>
			</element>
			<!--due a bug in castor a stack overflow occurs when we put id, timeZoneOffset, dateTimePattern inside the AttributesTableSequence -->
			<element name="id" type="fews:ColumnDisplayNameAnnotatedIdType">
				<annotation>
					<documentation>ids of the locations in the dbf file. e.g. "H_%ID%", put the actual dbase column
						name between %%.
					</documentation>
				</annotation>
			</element>
			<element name="ignoreIdsMissingInLocationSet" type="boolean" minOccurs="0" default="false">
				<annotation>
					<documentation>Since 2021.02. When false (default) a config warning is logged for each location id not in the locations set</documentation>
				</annotation>
			</element>
			<choice minOccurs="0">
				<element name="requireAllIdsInLocationSet" type="boolean" minOccurs="0" default="false">
					<annotation>
						<documentation>Since 2023.01. When true a config error is logged when not all locations are listed that exist in the location set. Missing rows can be added automatically in the tabular config viewer</documentation>
					</annotation>
				</element>
				<element name="requireAllIdsInParentFile" type="boolean" minOccurs="0" default="false">
					<annotation>
						<documentation>Since 2023.01. When true a config error is logged when not all locations are listed that exist in the parent csv/shp file. The location set can contain fewer ids that the csv due a constraint defined in the location set. Missing rows can be added automatically in the tabular config viewer</documentation>
					</annotation>
				</element>
			</choice>
			<element name="timeZoneOffset" type="fews:timeZoneOffsetStringType" minOccurs="0">
				<annotation>
					<documentation>This offset is always relative to GMT. For example "+02:00" means GMT+02:00. If no offset specified, then time zone GMT is used by default.</documentation>
				</annotation>
			</element>
			<element name="dateTimePattern" type="fews:nonEmptyStringType" default="yyyyMMdd" minOccurs="0">
				<annotation>
					<documentation>default is yyyyMMdd, this is the internal format a dbf file is using when the column is of type 'D'
					</documentation>
				</annotation>
			</element>
			<group ref="fews:AttributesTableSequence"/>
		</sequence>
	</complexType>
  <complexType name="AttributesTableComplexType">
		<sequence>
			<element name="description" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>Description</documentation>
				</annotation>
			</element>
			<element name="name" type="fews:nonEmptyStringType">
				<annotation>
					<documentation>Table name</documentation>
				</annotation>
			</element>
			<element name="id" type="fews:ColumnDisplayNameAnnotatedIdType">
				<annotation>
					<documentation>ids of the locations in the dbf file. e.g. "H_%ID%", put the actual dbase column
						name between %%.
					</documentation>
				</annotation>
			</element>
			<element name="ignoreIdsMissingInLocationSet" type="boolean" minOccurs="0" default="false">
				<annotation>
					<documentation>Since 2021.02. When false (default) a config warning is logged for each location not in the locations set</documentation>
				</annotation>
			</element>
			<group ref="fews:AttributesTableSequence"/>
		</sequence>
	</complexType>
	<group name="AttributesTableSequence">
		<sequence>
			<choice>
					<sequence>
						<element name="startDateTime" type="fews:nonEmptyStringType" minOccurs="0">
							<annotation>
								<documentation>start time of the period the values in the row should be used
									eg "%START_DATE% %START_TIME%", put the actual dbase column name between %%.
									When the values are always valid do not specify a period.
									When the all the values in the dbf file are valid for a constant period specify a literal date time eg "2000/1/1"
								 Default is the beginning of time
								</documentation>
							</annotation>
						</element>
						<element name="endDateTime" type="fews:nonEmptyStringType" minOccurs="0">
							<annotation>
								<documentation>see start date time
								</documentation>
							</annotation>
						</element>
					</sequence>
				<sequence>
					<element name="visibilityStartDateTime" type="fews:nonEmptyStringType" minOccurs="0">
						<annotation>
							<documentation>Set the visibilty period of the location when not defined in the main location</documentation>
						</annotation>
					</element>
					<element name="visibilityEndDateTime" type="fews:nonEmptyStringType" minOccurs="0">
						<annotation>
							<documentation>see visibility start date time
							</documentation>
						</annotation>
					</element>
				</sequence>
			</choice>
			<element name="shortName" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>Short name of location for chart legend. e.g. %SHORT_NAME%, put the actual
						column name
						between %%
					</documentation>
				</annotation>
			</element>
			<element name="parentLocationId" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>Z coordinate of the point (altitude). e.g. %Z%, put the actual column name between %% The default z is 0.
					</documentation>
				</annotation>
			</element>
			<element name="z" type="fews:ColumnDisplayNameAnnotatedIdType" minOccurs="0">
				<annotation>
					<documentation>Z coordinate of the point (altitude). e.g. %Z%, put the actual column name between %% The default z is 0
					</documentation>
				</annotation>
			</element>
			<element name="checkForContinuousPeriod" type="boolean" minOccurs="0" default="true">
				<annotation>
					<documentation>Since 2016.01. When true (default) errors will be logged for locations with time dependent attributes that have overlapping periods or gaps between periods</documentation>
				</annotation>
			</element>
			<choice minOccurs="0" maxOccurs="unbounded">
				<element name="relation" type="fews:LocationRelationComplexType">
					<annotation>
						<documentation>Relation that can be used in time series sets and constraints and functions. When a location relation is specified in a time series set the time series set locations are mapped to the related locations and these related locations are used to read/write the time series. e.g. "H_%UPSTREAM_ID%, put the actual shape/dbase column name between %%. Can not be used in combination with startDateTime and endDateTime
						</documentation>
					</annotation>
				</element>
				<element name="oneToManyRelation" type="fews:LocationRelationComplexType">
					<annotation>
						<documentation>SINCE 2019.01. Relation that allows map to multiple locations. A one to many relation that can be only be used in time series sets and not in constraints or functions. When a location relation is specified in a time series set the time series set locations are mapped to the related locations and these related locations are used to read/write the time series. e.g. "H_%UPSTREAM_ID%, put the actual shape/dbase column name between %% Can not be used in combination with startDateTime and endDateTime
						</documentation>
					</annotation>
				</element>
			</choice>
			<group ref="fews:AttributesSequence" minOccurs="0"/>
			<element name="skipRowWhenColumnValueEquals" type="fews:ColumnNameAndValueComplexType" minOccurs="0">
				<annotation>
					<documentation>Makes it possible to ignore the lines that are not in use. It will skip all rows that have a certain column value</documentation>
				</annotation>
			</element>
		</sequence>
	</group>
	<complexType name="ColumnNameAndValueComplexType">
		<attribute name="columnName" type="string"  use="required">
			<annotation>
				<documentation>Name of the column that should be checked</documentation>
			</annotation>
		</attribute>
		<attribute name="columnValue" type="string" use="required">
			<annotation>
				<documentation>Value of the column</documentation>
			</annotation>
		</attribute>
		<attribute name="ignoreCase" type="boolean">
			<annotation>
				<documentation>Ignore the case of the value</documentation>
			</annotation>
		</attribute>
	</complexType>
	<complexType name="LocationRelationComplexType">
		<sequence>
			<element name="description" type="fews:nonEmptyStringType" minOccurs="0">
				<annotation>
					<documentation>
						Describes where and why this relation is used
					</documentation>
				</annotation>
			</element>
			<element name="relatedLocationId" type="fews:nonEmptyStringType">
				<annotation>
					<documentation>
						Reference to another location.
						e.g. H_%UPSTREAM_ID%, put the actual column name between %%
					</documentation>
				</annotation>
			</element>
			<element name="required" type="boolean" minOccurs="0">
				<annotation>
					<documentation>When there is no value for the referenced column are config error is logged</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="id" type="fews:idStringType" use="optional">
			<annotation>
				<documentation>This location relation id can be referenced from time series sets.</documentation>
			</annotation>
		</attribute>
		<attribute name="name" type="fews:idStringType" use="optional">
			<annotation>
				<documentation>Name used in the tabular config file display</documentation>
			</annotation>
		</attribute>
	</complexType>
	<group name="SortingChoice">
		<choice>
			<element name="sortByName" type="boolean" default="false">
				<annotation>
					<documentation>Sorts the locations in this set by name. When false the order  of the specified location ids or the order in the esri shape file is used. Note that this only applies to the sorting of locations within a locationSets and will not influence the location order in, for instance,  the data viewer</documentation>
				</annotation>
			</element>
			<element name="sortingLocationAttributeId" type="fews:idStringType">
				<annotation>
					<documentation>Since 2014.01  Location attribute Id the locations should be sorted by in this set. Each location can only have 1 attribute which defines the sorting, this will automatically be the first defined. Sorting of locations with different sorting attributes will result in grouping locations with the same sorting attribute together.</documentation>
				</annotation>
			</element>
			<sequence>
				<element name="chainageLocationAttributeId" type="fews:idStringType">
					<annotation>
						<documentation>Id of location attribute, each location that has a value for this attribute belongs to the chainage. The value of this attribute determines the position in the
							chainage.
						</documentation>
					</annotation>
				</element>
				<element name="chainageLabelLocationAttributeId" type="fews:idStringType" minOccurs="0">
					<annotation>
						<documentation>Optional field. If configured, this location attribute will be used as the label of vertical station lines in longitudinal plot
							If a location does not have this attribute, there will be no vertical station line drawn. This should be a text attribute.
						</documentation>
					</annotation>
				</element>
			</sequence>
		</choice>
	</group>
</schema>
