<?xml version="1.0" encoding="UTF-8"?>
<xs:schema 
	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
	xmlns:tsd="http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition" 
	xmlns:xlink="http://www.w3.org/TR/xlink" 
	xmlns:ted="http://hul.harvard.edu/ois/xml/ns/ted/TEDSchema.html" 
	elementFormDefault="qualified" 
	attributeFormDefault="unqualified" 
	ted:doctype="/iranianOralHistory" 
	ted:searchindex="Anywhere|/tape" 
	ted:advancedsearchboolean="2" 
	ted:advancedsearchindex="Anywhere|/tape, Narrator|/tape/narrator /tape/narratorTransliterated, Subject|/tape/subject /tape/transliteratedSubject /tape/narratorTransliterated /tape/narratorSubject" 
	ted:dropDownLimit="Gender|/tape/gender|/Male/Female, Language|/tape/language|English/Persian" 
	ted:checkBoxLimit="Digital Audio|/tape/digitalAudio, Digital Transcript|/tape/digitalTranscript" 
	ted:browseindex="Narrator|/iranianOralHistory/tape/narrator /iranianOralHistory/tape/narratorTransliterated,  Subject|/iranianOralHistory/tape/subject /iranianOralHistory/tape/transliteratedSubject /iranianOralHistory/tape/narratorTransliterated /iranianOralHistory/tape/narratorSubject" 
	ted:resultsdisplay="Narrator|/iranianOralHistory/tape/narrator, Tape Number|/iranianOralHistory/tape/tapeNumber" 
	ted:saverecord="/iranianOralHistory/tape" 
	ted:instanceLabel="/iranianOralHistory/tape/narrator,/tape/tapeNumber" 
        ted:numberSort="1"
        ted:sortIndex="Narrator and Tape Number|/uniqueKey" 
        ted:defaultSort="Narrator and Tape Number" 
	ted:defaultRecordDisplay="expand">
        <xs:import namespace="http://www.w3.org/TR/xlink" schemaLocation="http://hul.harvard.edu/ois/xml/xsd/xlink/xlink.xsd"/>
	<!--Change History
		2006-03-13: Changed <subject> to repeatable.
		Removed lastNameTransliterated and firstNameTransliterated 
        Added narratorTransliterated  
		Added transliteratedSubject (RKW)
    
        2006-03-15: Deleted pageNo
		Added digitalTranscriptSuppressed 
		Added digitalAudioSuppressed (RKW)

		2006-03-29: Added ted markup
		Resequenced elements
		Changed type "MODS:nametype" to "xs:string"
		Added ted:label to narratorTransliterated  
		Removed ted:labels on xlink attributes (RKW)

		2006-04-06: Removed digitalAudio and digitalTranscript from results display (would require development). 
		Added narratorTransliterated to various browses and searches (RKW)
		
		2006-04-21: Changed subject and transliteratedSubject to xs:string (VL)
		Removed MODS import (VL)
		Added narratorSubject element; added narratorSubject to ted:advancedsearchindex and ted:browseindex (RKW)

	-->
	<xs:element name="iranianOralHistory">
		<xs:annotation>
			<xs:documentation>Each record in this database represents a single tape and accompanying transcript from an interview. Any given interview may span more than one tape, resulting in more than one record per interview.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>

                                <xs:element name="uniqueKey" type="xs:string" ted:visibility="owner">
                                        <xs:annotation>
                                                <xs:documentation>To be populated by OIS with a key constructed from Narrator and tape No.
                                                </xs:documentation>
                                        </xs:annotation>
                                </xs:element>



				<xs:element ref="tape"/>
				<xs:element ref="admin" ted:visibility="owner"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="tape">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="narrator" type="xs:string">
					<xs:annotation>
						<xs:documentation>This came from the "Last First Name" element that tied Control database to Index Database in source FileMakerPro files</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="lifeStatus" type="xs:string" minOccurs="0"/>
				<xs:element name="biographicalNote" type="xs:string"/>
				<xs:element name="gender">
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="Male"/>
							<xs:enumeration value="Female"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="tapeNumber" type="xs:string"/>
				<xs:element name="digitalTranscript" minOccurs="0">
					<xs:complexType>
						<xs:attribute ref="xlink:href" use="optional" ted:visibility="owner"/>
						<xs:attribute ref="xlink:show" use="optional" ted:visibility="owner"/>
					</xs:complexType>
				</xs:element>
				<xs:element name="pages" type="xs:integer"/>
				<xs:element name="digitalAudio" minOccurs="0">
					<xs:complexType>
						<xs:attribute ref="xlink:href" ted:label="href"/>
						<xs:attribute ref="xlink:show" ted:label="new"/>
					</xs:complexType>
				</xs:element>
				<xs:element name="tapeLength" type="xs:string"/>
				<xs:element name="language" type="xs:string"/>
				<xs:element name="restriction" type="xs:string"/>
				<xs:element name="interviewer" type="xs:string"/>
				<xs:element name="interviewDate" type="xs:date"/>
				<xs:element name="interviewLocation" type="xs:string"/>
				<xs:element name="subject" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element name="narratorSubject" minOccurs="0"  type="xs:string" ted:label="Subject"/>
				<xs:element name="narratorTransliterated" minOccurs="0" type="xs:string" ted:label="Transliterated Subject"/>
				<xs:element name="transliteratedSubject" minOccurs="0" type="xs:string" maxOccurs="unbounded"/>
				<xs:element name="digitalAudioSuppressed" minOccurs="0" ted:visibility="owner">
					<xs:complexType>
						<xs:attribute ref="xlink:href"/>
						<xs:attribute ref="xlink:show"/>
					</xs:complexType>
				</xs:element>
				<xs:element name="digitalTranscriptSuppressed" minOccurs="0" ted:visibility="owner">
					<xs:complexType>
						<xs:attribute ref="xlink:href"/>
						<xs:attribute ref="xlink:show"/>
					</xs:complexType>
				</xs:element>
				<xs:element name="indexed" type="xs:string" ted:visibility="owner"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="admin">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="createDate" type="xs:date" ted:visibility="owner"/>
				<xs:element name="deleteDate" type="xs:date" minOccurs="0" ted:visibility="owner"/>
				<xs:element name="status" ted:visibility="owner">
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="In process"/>
							<xs:enumeration value="Active"/>
							<xs:enumeration value="Suppressed"/>
							<xs:enumeration value="Deleted"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="updateNote" minOccurs="0" maxOccurs="unbounded" ted:visibility="owner">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="updateDate" type="xs:date" minOccurs="0" ted:visibility="owner"/>
							<xs:element name="operator" type="xs:string" minOccurs="0" ted:visibility="owner"/>
							<xs:element name="updateDescription" type="xs:string" minOccurs="0" ted:visibility="owner"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>


