<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
	<xs:element name="dataset"> <!-- root element -->
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="location" maxOccurs="unbounded"/> <!-- a production with all "metadata" for an event or a sequence of events -->
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="location"> <!-- a location where an event can take place -->
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="name" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="street" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="postcode" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="city" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="country" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="mediaText" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="url" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="email" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="category" minOccurs="0" maxOccurs="unbounded"/> <!-- the categories of this location -->
				<xs:element ref="picture" minOccurs="0" maxOccurs="unbounded"/> <!-- all images of this event -->
				<xs:element ref="number" minOccurs="0" maxOccurs="unbounded"/> <!-- all images of this event -->
				<xs:element ref="coordinates" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="error" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="keywords" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="keywords_admin" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="openinghours" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
			<xs:attribute name="id" type="xs:integer"/> <!-- location id -->
		</xs:complexType>
	</xs:element>

	<xs:element name="keywords"/> <!-- keywords -->
	<xs:element name="keywords_admin"/> <!-- keywords_admin -->
	<xs:element name="error"/> <!-- an error if location not found -->
	<xs:element name="street"/> <!-- street of location -->
	<xs:element name="postcode"/> <!-- street of location -->
	<xs:element name="city"> <!-- name of location -->
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="0"/>
			<xs:attribute name="id" type="xs:integer"/> <!-- id of the city -->
			<xs:attribute name="languageId" type="xs:integer" default="1"/> <!-- id describing the language of the text (1=DE, 2=EN, ...) -->
		</xs:complexType>
	</xs:element>
	<xs:element name="country"/> <!-- country of location -->
	<xs:element name="name"> <!-- name of location -->
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="0"/>
			<xs:attribute name="languageId" type="xs:integer" default="1"/> <!-- id describing the language of the text (1=DE, 2=EN, ...) -->
		</xs:complexType>
	</xs:element>
	<xs:element name="url"/> <!-- url of location -->
	<xs:element name="email"/> <!-- email of location -->
	<xs:element name="category"> <!-- a category -->
		<xs:complexType mixed="true">
			<xs:attribute name="systemShortname"/>
			<xs:attribute name="id"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="picture"> <!-- an image (JPG, GIF, ...) related to an event -->
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="title"/> <!-- the title of the picture (multilanguage) -->
				<xs:element ref="mediaText" minOccurs="0"/> <!-- a text related to the image (description or subtitle) the relation id of the mediaText element has to be 7 for description and 6 for subtitle -->
			</xs:sequence>
			<xs:attribute name="copyright"/> <!-- the copyright information -->
			<xs:attribute name="foreignId"/> <!-- the database id of this image in the database of the importer -->
			<xs:attribute name="id" type="xs:integer"/> <!-- the database id in the media database -->
			<xs:attribute name="photographer"/> <!-- the photographer/artist/creator of this picture -->
			<xs:attribute name="position" type="xs:integer"/> <!-- the position of the picture -->
			<xs:attribute name="url" type="xs:string"/> <!-- the complete url of the picture (including http://...) -->
		</xs:complexType>
	</xs:element>
	<xs:element name="number"> <!-- a telecommunications number -->
		<xs:complexType mixed="true">
			<xs:attribute name="type"/> <!-- 1,2,3 = telephone 4 = fax -->
			<xs:attribute name="priority"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="coordinates"> <!-- geo coordinates for location -->
		<xs:complexType mixed="true">
			<xs:sequence>
				<xs:element ref="x"/> <!-- x coord -->
				<xs:element ref="y"/> <!-- y coord -->
				<xs:element ref="z"/> <!-- z coord -->
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="x"/> <!-- x coord -->
	<xs:element name="y"/> <!-- y coord -->
	<xs:element name="z"/> <!-- z coord -->
	<xs:element name="mediaText"> <!-- a text with additional information -->
		<xs:complexType mixed="true">
			<xs:sequence>
				<xs:element ref="text" maxOccurs="unbounded"/> <!-- a text element to provide multilanguage support -->
			</xs:sequence>
			<xs:attribute name="relation" type="xs:integer" use="required"/> <!-- the relation of the text to an object -->
			<xs:attribute name="position" type="xs:integer"/> <!-- the position of the text -->
			<xs:attribute name="foreignId"/> <!-- the database id of the text in the database of the importer -->
			<xs:attribute name="id" type="xs:integer"/> <!-- the id of the entry in the media database of culturebase -->
		</xs:complexType>
	</xs:element>
	<xs:element name="text"> <!-- a text with additional information and multilangage support -->
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="0"/>
			<xs:attribute name="languageId" type="xs:integer" default="1"/> <!-- id descriing the language of the text (1=DE, 2=EN, ...) -->
			<xs:attribute name="author" type="xs:string"/> <!-- the author of the text -->
			<xs:attribute name="copyright" type="xs:string"/> <!-- the copyright information of the text -->
		</xs:complexType>
	</xs:element>
	<xs:element name="title"> <!-- a title -->
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="0"/>
			<xs:attribute name="languageId" type="xs:integer" default="1"/> <!-- id describing the language of the text (1=DE, 2=EN, ...) -->
		</xs:complexType>
	</xs:element>
	<xs:element name="openinghours"> <!-- opening hour information -->
		<xs:complexType mixed="true">
			<xs:sequence>
				<xs:element ref="comments" minOccurs="0" maxOccurs="1"/> <!-- a text element for descriptive text -->
			</xs:sequence>
			<xs:attribute name="mon" type="xs:string"/> <!-- Monday -->
			<xs:attribute name="tue" type="xs:string"/> <!-- Tuesday -->
			<xs:attribute name="wed" type="xs:string"/> <!-- Wednesday -->
			<xs:attribute name="thu" type="xs:string"/> <!-- Thursday -->
			<xs:attribute name="fri" type="xs:string"/> <!-- Friday -->
			<xs:attribute name="sat" type="xs:string"/> <!-- Saturday -->
			<xs:attribute name="sun" type="xs:string"/> <!-- Sunday -->
			<xs:attribute name="same" type="xs:string"/> <!-- everyday the same -->
			<xs:attribute name="closed" type="xs:integer"/> <!-- closed -->
			<xs:attribute name="type" type="xs:integer"/> <!-- type -->
		</xs:complexType>
	</xs:element>
	<xs:element name="comments"/> <!-- country of location -->
</xs:schema>
