<?xml version="1.0"?>
<!-- parry: schema for the database of song events collected by Parry and Lord. -->
<!-- Prepared by Robin Wendler, Harvard University Library Office for Information Systems -->
<!-- draft 0.1 rev. 4/10/2003 -->
<!-- rev. 12/10/2002: remove agent/agentType in favor of choice under textType; make more elements optional; 
revise to accommodate "copied" methodology and add manuscript/typescript distinction -->
<!-- rev. 12/11/2002: revise text elements based on discussion, add xlink-->
<!-- rev. 1/2/2003: revise TED attributes -->
<!-- rev. 4/10/2003: add admin section and record section, restructure links to avoid importing xlink in this version of Tamino -->
<!-- rev. 4/24/2003: revise to reflect latest interface spec; drastically revised date element(s) -->
<!-- rev. 5/21/2003 CM 
    1. Made publishedIn/volumeNumber and publishedIn/pagination optional.
    2. Added s.d. to the dateType enumeration

    rev. 6/3/0003 CM
    1. Added Number of Lines and Published in labels	 	
    2. Capitalized Collection for Parry and Lord
    3. Changed ItemNumber to Item Number
    4. Change Start_Date to Start Date
    5. Remove Text Type label

    06/04/03 removed target namespace for compatibility w/ tamino
    targetNamespace="http://ois.harvard.edu/parry/" 
	xmlns="http://ois.harvard.edu/parry/" 

    07/17/03 CM - Schema changes
    1. Added [Scribe Type] to choice element
    2. Added ted:textRows=4 and ted:textColumns=30 to note 
    and nonpublic note.
    3. Added ted:label System ID to SongID.

    07/18/03 CM - Schema changes
    1. Added s.d. to second dateType enumeration    
    2. Added <xs:enumeration value=""/> to all optional enumerations.
    This includes DateType (2) and language. This is to allow enumeration
    values to be deleted from optional elements.

    08/21/03 CM - xlink
    1. Tried to add xmlns:xlink="http://www.w3.org/TR/xlink" 

    02/02/04 CM 
    1. Updated schema with new markup. This includes 
	a. removing ? from advancedsearchindex
	b. replacing limitbyvalue with dropDownList
	c. replacing limitbyexistence with checkBoxLimit
	d. removing browsexpath markup

    2. Changed checkBoxLimit key from digitalAudio to Digital Audio
    3. Changed checkBoxLimit key from digitalText to Digital Text	
-->

<xs:schema 
	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
	xmlns:tsd="http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition" 
	xmlns:ted="http://hul.harvard.edu/ois/xml/ns/ted/TEDSchema.html" 
	xmlns:xlink="http://www.w3.org/TR/xlink"
	elementFormDefault="qualified" 
	attributeFormDefault="unqualified" 
	ted:doctype="/parry" 
	ted:searchindex="Anywhere|/record" 
	ted:advancedsearchboolean="2" 
	ted:advancedsearchindex="Anywhere|/record, Singer|/record/singer/name, Title|/record/title /record/translatedTitle /record/alternateTitle, Date|/record/date/singleDate /record/dateRange/startDate /record/dateRange/endDate, Place|/record/location, Item Number|/record/itemNumber" 
	ted:dropDownLimit="Collection Method|/record/collectionMethod|/autograph/copied/dictated/recorded, Collection|/record/collection|Parry Collection/Lord Collection" 
	ted:checkBoxLimit="Digital Audio|/record/audio/digitalAudio, Digital Text|/record/:text/digitalText" 
	ted:browseindex="Title|/parry/record/title /parry/record/alternateTitle /parry/record/translatedTitle, Date|/parry/record/date/singleDate /parry/record/dateRange/startDate /parry/record/dateRange/endDate, Singer|/parry/record/singer/name, Location|/parry/record/location"
	ted:resultsdisplay="ItemNumber|/parry/record/itemNumber[1], Singer|/parry/record/singer[1]/name, Title|/parry/record/title[1], Place|/parry/record/location[1], Date|/parry/record/date[1]/singleDate, StartDate|/parry/record/dateRange[1]/startDate" 
	ted:saverecord="/parry/record"
        ted:instanceLabel="/parry/record/title,/parry/record/itemNumber"

	ted:defaultRecordDisplay="expand">
<!--

	ted:dateSearch="fromDateYear, fromDateMonth, fromDateDay, throughDateYear, throughDateMonth, throughDateDay"
	ted:dateIndex="/record/date/singleDate"
	ted:numberSort="2"
	ted:sortIndex="Singer|record/singer[1]/name, Title|record/title[1], Location|record/location[1]"
	ted:defaultSort="Singer"

	ted:limitbyvalue="collectionMethod|/autograph/copied/dictated/recorded, collection|/Parry Collection/Lord Collection" 

	ted:browsexpath="Title|/record/title /record/alternateTitle /record/translatedTitle, Date|/record/date/singleDate /record/dateRange/startDate /record/dateRange/endDate, Singer|/record/singer/name, Location|/record/location "

	ted:resultsChoice="all"
-->
	<xs:import namespace="http://www.w3.org/TR/xlink" schemaLocation="http://hul.harvard.edu/ois/xml/xsd/mpcol/xlink.xsd"/>
	<xs:element name="parry">
		<xs:complexType>
				<xs:sequence>
					<xs:element name="record" type="recordType"/>
					<xs:element name="admin" type="adminType" ted:visibility="owner"/>
				</xs:sequence>
				<xs:attribute name="SongID" type="xs:ID" use="optional" ted:label="System ID"/>
				<xs:attribute name="oldDBID" type="xs:string" use="optional"/>				
		</xs:complexType>
	</xs:element>
		<xs:complexType name="recordType">
		<xs:sequence>
			<xs:element name="singer" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="name" type="xs:string"  ted:resultsdisplay="Singer"/>
						<xs:element name="religion" type="xs:string" minOccurs="0"/>
						<xs:element name="biographicalNote" type="xs:string" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="title" type="xs:string" ted:resultsdisplay="Title"/>
			<xs:element name="translatedTitle" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="alternateTitle" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="location" type="xs:string" minOccurs="0" ted:resultsdisplay="Place"/>
			<xs:element name="date" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="singleDate" type="xs:date" minOccurs="0" ted:resultsdisplay="Date"/>
						<xs:element name="dateType" minOccurs="0">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="received"/>
									<xs:enumeration value="sent"/>
									<xs:enumeration value="s.d."/>
									<xs:enumeration value=""/>

								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="dateRange" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="startDate" type="xs:date" ted:resultsdisplay="Start Date"/>
						 <xs:element name="endDate" type="xs:date" />
						<xs:element name="dateType" minOccurs="0">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="received"/>
									<xs:enumeration value="sent"/>
									<xs:enumeration value="s.d."/>
									<xs:enumeration value=""/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="genre" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="subject" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="language" minOccurs="0" maxOccurs="unbounded">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="Bosnian, Croatian, or Serbian language"/>
						<xs:enumeration value="Albanian"/>
						<xs:enumeration value="Turkish"/>
						<xs:enumeration value=""/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="collectionMethod">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="copied"/>
						<xs:enumeration value="dictated"/>
						<xs:enumeration value="recorded"/>
						<xs:enumeration value="autograph"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="collection">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="Parry Collection"/>
						<xs:enumeration value="Lord Collection"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="itemNumber" type="xs:string" ted:resultsdisplay="Item number"/>
			<xs:element name="audio" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="recordingNumber" type="xs:string"/>
						<xs:element name="digitalAudio" minOccurs="0">
							<xs:complexType>
								<xs:attribute ref="xlink:href" ted:label="href"/>
								<xs:attribute ref="xlink:show" ted:label="show"/>
							</xs:complexType>
						</xs:element>
						<xs:element name="playingTime" type="xs:string" minOccurs="0"/>
						<xs:element name="physicalMedium">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="unspecified"/>
									<xs:enumeration value="aluminum disk"/>
									<xs:enumeration value="wire spool"/>
									<xs:enumeration value="tape"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="audioNote" type="xs:string" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="text" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="availableText">
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="manuscript"/>
									<xs:enumeration value="typescript"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:choice minOccurs="0" ted:label="[Scribe Type]">
							<xs:element name="transcriber" type="xs:string" minOccurs="0"/>
							<xs:element name="dictatedTo" type="xs:string" minOccurs="0"/>
						</xs:choice>
						<xs:element ted:label="Number of Lines" name="numberOfLines" type="xs:integer" minOccurs="0"/>
						<xs:element name="digitalText" minOccurs="0">
							<xs:complexType>
								<xs:attribute ref="xlink:href" ted:label="href"/>
								<xs:attribute ref="xlink:show" ted:label="show"/>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element ted:label="Published in" name="publishedIn" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="volumeTitle" type="xs:string" minOccurs="0"/>
						<xs:element name="volumeNumber" type="xs:string" minOccurs="0"/>
						<xs:element name="songNumber" type="xs:string" minOccurs="0"/>
						<xs:element name="pagination" type="xs:string" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded" ted:textRows="4" ted:textColumns="30"/>
			<xs:element name="nonpublicNote" type="xs:string" minOccurs="0" maxOccurs="unbounded" ted:textRows="4" ted:textColumns="30" ted:visibility="owner"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="adminType">
		<xs:sequence>
			<xs:element name="createDate" type="xs:date" 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" ted:visibility="owner"/>
						<xs:element name="operator" type="xs:string" ted:visibility="owner"/>
						<xs:element name="updateDescription" type="xs:string" ted:visibility="owner"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

