<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by eval (eval) -->
<!-- schema version 0.5a040130 -->
<!--changes:
	2.7_20111114: AsocFileType also for speakers and corpora.
	2.6_20110125: AsocFileType. Für Hanna.
	2.5_20101222: replaced all file/URL/path references with FileType (HH)
	2.1_20101216: moved Availability from Recording to Media (HH), renamed "Filestores" to "Mirrors"
	2.0: added "role" as replacement for speaker-linking via "setting"
	1.6_20100412: added FileType for attaching files
	1.6_20090326: elements below personType do not need a specific order anymore. removed "related person"-element, made PeriodExact optional
	1.5_20081215: changed schema so Communication and Speakers can appear in any sequence
	changed RecodringDuration to milliseconds (xs:long type)
	1.1_20080603: added "Annotation" and "AnnotationType" to "Transcription" to use it with "sextant"
	1.0_20080402: changed "known human" from mandatory to optional since nobody understands it anyway
	0.9_20070320: changed CorpusData from xs:sequence to  xs:choice maxOccurs="unbounded" to allow speaker / comm-childs unordered
	0.8_20070320: added attribute "uniqueSpeakerDistinction" to CorpusType for usage with the PartiturEditor
	0.7_20070222: added attribute "Type" to Languagetype
	0.6_20070222: added attribute "Type" to Location-Complextype
	0.5a_20040130 - initial
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
	attributeFormDefault="qualified">
	<xs:element name="Corpus">
		<xs:annotation>
			<xs:documentation>Mother Of All Metadata Elements (MOAME(tm))</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:complexContent>
				<xs:restriction base="CorpusType">
					<xs:sequence>
						<xs:element name="DBNode" minOccurs="0">
							<xs:annotation>
								<xs:documentation>deprecated: forgot it's purpose</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="Description" type="DescriptionType" minOccurs="0">
							<xs:annotation>
								<xs:documentation>description of the (sub)corpus</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:choice minOccurs="0">
							<xs:element name="CorpusData" type="CorpusData"/>
							<xs:element name="Corpus" type="CorpusType" maxOccurs="unbounded"/>
						</xs:choice>
					</xs:sequence>
				</xs:restriction>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="LocationType">
		<xs:annotation>
			<xs:documentation>type for storing addresses</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="Street" type="xs:string" minOccurs="0"/>
			<xs:element name="City" type="xs:string" minOccurs="0"/>
			<xs:element name="PostalCode" type="xs:string" minOccurs="0"/>
			<xs:element name="Country" type="xs:string" minOccurs="0"/>
			<xs:element name="Period" type="PeriodType" minOccurs="0"/>
			<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
		</xs:all>
		<xs:attribute name="Type" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:simpleType name="non-empty-string">
		<xs:annotation>
			<xs:documentation>should not be empty ;)</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="CorpusType">
		<xs:annotation>
			<xs:documentation>Type for storing corpus information</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="DBNode" minOccurs="0">
				<xs:annotation>
					<xs:documentation>link to the node containing the corpus</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Description" type="DescriptionType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>description of the (sub)corpus</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Mirrors" type="DescriptionType" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>description can hold links to mirrored versions of the
						corpus</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:choice minOccurs="0">
				<xs:element name="CorpusData" type="CorpusData"/>
				<xs:element name="Corpus" type="CorpusType" maxOccurs="unbounded"/>
			</xs:choice>
			<xs:element name="AsocFile" type="AsocFileType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="Name" type="non-empty-string" use="required"/>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
		<xs:attribute name="Parent" type="xs:IDREF" use="optional"/>
		<xs:attribute name="uniqueSpeakerDistinction" type="xs:string" use="optional"> </xs:attribute>
		<xs:attribute name="schemaVersion" type="xs:string" use="required"/>
	</xs:complexType>
	<xs:complexType name="RecordingType">
		<xs:annotation>
			<xs:documentation>type for storing information about recordings</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Name" type="xs:string" minOccurs="0"/>
			<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
			<xs:element name="Media" type="MediaType" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>deprecated: use File Element instead</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="File" type="FileType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="RecordingDateTime" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="RecordingDuration" type="xs:long" minOccurs="0"/>
			<xs:element name="Availablilty" type="AvailabilityType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>deprecated: exists inside File</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
	</xs:complexType>
	<xs:complexType name="AvailabilityType">
		<xs:annotation>
			<xs:documentation>type for storing copyright/obtaining data</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Available" type="xs:boolean"/>
			<xs:element name="URL" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Copyright" type="xs:string" minOccurs="0"/>
			<xs:element name="ObtainingInformation" type="DescriptionType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="DescriptionType">
		<xs:annotation>
			<xs:documentation>type for storing descriptions for various elements</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Key" type="KeyType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MediaType">
		<xs:annotation>
			<xs:documentation>deprecated: use File type instead</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
			<xs:element name="FileStore" type="xs:string" minOccurs="0"/>
			<xs:element name="Filename" minOccurs="0"/>
			<xs:element name="NSLink" type="xs:anyURI" minOccurs="0"/>
			<xs:element name="LastBackup" type="xs:date" minOccurs="0"/>
			<xs:element name="Availability" type="AvailabilityType" minOccurs="0"/>
		</xs:all>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
	</xs:complexType>
	<xs:complexType name="FileType">
		<xs:annotation>
			<xs:documentation>a file in the filesystem</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="Availability" type="AvailabilityType"/>
			<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
			<xs:element name="filename" type="xs:string" minOccurs="0"/>
			<xs:element name="mimetype" type="xs:string" minOccurs="0"/>
			<xs:element name="relPath" type="xs:string" minOccurs="0"/>
			<xs:element name="absPath" type="xs:anyURI" minOccurs="0"/>
			<xs:element name="URL" type="xs:anyURI" minOccurs="0"/>
		</xs:all>
		<xs:attribute name="Id" type="xs:ID" use="required">
			<xs:annotation>
				<xs:documentation>hanna wants to get rid of this...</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="PersonType">
		<xs:annotation>
			<xs:documentation>type for storing speaker descriptions</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:choice maxOccurs="unbounded">
				<xs:element name="Sigle" type="xs:string" minOccurs="1" maxOccurs="1"/>
				<xs:element name="KnownHuman" type="xs:boolean" default="true" minOccurs="0"
					maxOccurs="1">
					<xs:annotation>
						<xs:documentation>deprecated: didn't turn out to be
							useful</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Pseudo" type="xs:string" minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>Can hold names, but names should always be
							pseudos</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Sex" type="xs:anySimpleType" minOccurs="0" maxOccurs="1"/>
				<xs:element name="Location" type="LocationType" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="Description" type="DescriptionType" minOccurs="0" maxOccurs="1"/>
				<xs:element name="Language" type="LanguageType" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="role" type="roleType" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="AsocFile" type="AsocFileType" minOccurs="0" maxOccurs="unbounded"
				/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
	</xs:complexType>

	<xs:complexType name="AsocFileType">
		<xs:annotation>
			<xs:documentation>type for storing any associated file</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Name"/>
			<xs:element name="File" type="FileType"/>
			<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
	</xs:complexType>

	<xs:complexType name="TranscriptionType">
		<xs:annotation>
			<xs:documentation>type for storing transcript-information</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Name"/>
			<xs:element name="File" type="FileType"/>
			<xs:element name="FileStore" type="xs:string" minOccurs="0">
				<xs:annotation>
					<xs:documentation>deprecated: forgot it's purpose</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Filename">
				<xs:annotation>
					<xs:documentation>deprecated: now uses File type</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="NSLink" type="xs:anyURI">
				<xs:annotation>
					<xs:documentation>deprecated: now uses File type</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
			<xs:element name="Availability" type="AvailabilityType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>deprecated: now uses File type</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Annotation" type="AnnotationType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
	</xs:complexType>
	<xs:complexType name="AnnotationType">
		<xs:annotation>
			<xs:documentation>type for linking to annotation files</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="Description" type="DescriptionType"/>
			<xs:element name="File" type="FileType"/>
		</xs:all>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
		<xs:attribute name="Name" type="xs:string"/>
	</xs:complexType>
	<xs:complexType name="LanguageType">
		<xs:annotation>
			<xs:documentation>type for storing languages</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="LanguageCode" type="xs:string"/>
			<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
		</xs:all>
		<xs:attribute name="Type" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="CommunicationType">
		<xs:annotation>
			<xs:documentation>type for storing Session Data. [06.10.03] Media deleted, Object
				added</xs:documentation>
		</xs:annotation>
		<xs:sequence maxOccurs="unbounded">
			<xs:choice>
				<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
				<xs:element name="Setting">
					<xs:complexType>
						<xs:complexContent>
							<xs:extension base="SettingType"/>
						</xs:complexContent>
					</xs:complexType>
				</xs:element>
				<xs:element name="Recording" type="RecordingType" minOccurs="0"
					maxOccurs="unbounded"/>
				<xs:element name="Transcription" type="TranscriptionType" minOccurs="0"
					maxOccurs="unbounded"/>
				<xs:element name="Location" type="LocationType" minOccurs="0"/>
				<xs:element name="Language" type="LanguageType" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="File" type="FileType" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>deprecated: now uses AsocFile</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="AsocFile" type="AsocFileType" minOccurs="0" maxOccurs="unbounded"
				/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
		<xs:attribute name="Name" type="xs:string" use="required"/>
	</xs:complexType>
	<xs:complexType name="CorpusData">
		<xs:annotation>
			<xs:documentation>actual corpus data</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:choice maxOccurs="unbounded">
				<xs:element name="Communication" type="CommunicationType" minOccurs="0"
					maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>=Session=Discourse (im Moment am ehesten IMDI, im Grunde
							nur Location Data) </xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Speaker" type="PersonType" minOccurs="0" maxOccurs="unbounded"/>
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="KeyType">
		<xs:annotation>
			<xs:documentation>key/value pairs fpr storing all kinds of
				information</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="Name" type="xs:string" use="required"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="ObjectType">
		<xs:annotation>
			<xs:documentation>Objects used/present in a communication</xs:documentation>
		</xs:annotation>
		<xs:all>
			<xs:element name="Name" type="xs:string"/>
			<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
			<xs:element name="Availability" type="AvailabilityType" minOccurs="0"/>
		</xs:all>
		<xs:attribute name="Id" type="xs:ID" use="required"/>
	</xs:complexType>
	<xs:complexType name="SettingType">
		<xs:annotation>
			<xs:documentation>Setting of a recording (communication?)</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:choice maxOccurs="unbounded">
				<xs:element name="Person" type="xs:IDREF" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
				<xs:element name="Object" type="ObjectType" minOccurs="0" maxOccurs="unbounded"/>
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="PeriodType">
		<xs:annotation>
			<xs:documentation>marks a period of time</xs:documentation>
		</xs:annotation>
		<xs:all minOccurs="0">
			<xs:element name="PeriodStart" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="PeriodExact" type="xs:boolean" minOccurs="0"/>
			<xs:element name="PeriodDuration" type="xs:long" minOccurs="0"/>
		</xs:all>
	</xs:complexType>
	<xs:complexType name="roleType">
		<!-- 
			role types starting with a '#' are used coma-internal		
			
			pre-defined role types:
			#participant			= speaker participating in a communication; replaces linking in settings
		-->
		<xs:annotation>
			<xs:documentation>Role of Speakers (and potentially other datatypes)</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:choice maxOccurs="unbounded">
				<xs:element name="Description" type="DescriptionType" minOccurs="0"/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="Type" type="xs:string" use="optional"/>
		<xs:attribute name="target" type="xs:IDREF" use="required"/>
	</xs:complexType>
</xs:schema>

