<?xml version="1.0" encoding="UTF-8"?>
<!-- editor: Ray Denenberg, Library of Congress, via XML Spy. Send comments to rden@loc.gov 

 PREMIS Preservation Metadata Schema  
 Version 2.0 , April 2008   DRAFT (actual date to be supplied when final)

This draft last updated June 25.
 - "termOfGrant ", previously a simple string of type edtf,  changed to a complexType with startDate and endDate both of type edtf. 
 - <storage> changed from mandatory to optional for file and bitstream.  This conflicts with the data dictionary which lists it mandatory, erroneously, and it has been cited as errata. 

Also updated May 13
'open' and 'unknown' changed to 'OPEN' and 'UNKNOWN'  (i.e. changed to uppercase) in regular expressions in date/time definition.

also updated May 7 
extensionComplexType definition:
			<xs:any namespace="##any" processContents="lax"/>
changed to:
			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>

Also updated May 5. 
All occurences of 
		<xs:attribute ref="version"..../>
changed to:
		<xs:attribute name="version" type="versionSimpleType" ..../>
because of namespace complexities. 

Also updated May 22. 
All occurences of 
       termsOfGrant
changed to:
	termOfGrant
because that's the term used in the data dictionary

Also updated June 10.
"termOfGrant "
changed to:
	"termOfGrant"
 trailing space removed. (The trailing space was not flagged by xmlSpy but this error was reported by a user using a different validator).

-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" targetNamespace="info:lc/xmlns/premis-v2" xmlns="info:lc/xmlns/premis-v2" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<!--   
 Import XLink-->
	<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.loc.gov/standards/xlink/xlink.xsd"/>
	<!-- 	

************** Root Element: one of the following  <premis>, <object>, <event>, <agent>, <rights> **********************

-->
	<xs:element name="premis" type="premisComplexType"/>
	<xs:element name="object" type="objectComplexType"/>
	<xs:element name="event" type="eventComplexType"/>
	<xs:element name="agent" type="agentComplexType"/>
	<xs:element name="rights" type="rightsComplexType"/>
	<!-- 	

************************************ premisComplexType 
-->
	<xs:complexType name="premisComplexType">
		<xs:sequence>
			<xs:element ref="object" minOccurs="1" maxOccurs="unbounded"/>
			<xs:element ref="event" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="agent" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="rights" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="version" type="versionSimpleType" use="required"/>
	</xs:complexType>
	<!-- 	


***********************************  objectComplexType  (and the three major <object>  category definitions)

-->
	<xs:complexType name="objectComplexType" abstract="true"/>
	<!--
***************  
The three "types":  'file', 'representation', and 'bitstream'. These are the values for the xsi:type attribute in an instance. 
For an object of type file: <object xsi:type="file">  will mean that the complexType "file" will be validated. 
For an object of type representation: <object xsi:type="representation">  will mean that the complexType "representation" will be validated. 
For an object of type bitstream: <object xsi:type="bitstream">  will mean that the complexType "bitstream" will be validated. 
******************

******* file
-->
	<xs:complexType name="file">
		<xs:complexContent>
			<xs:extension base="objectComplexType">
				<xs:sequence>
					<xs:element ref="objectIdentifier" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element ref="preservationLevel" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="significantProperties" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="objectCharacteristics" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element ref="originalName" minOccurs="0" maxOccurs="1"/>
					<xs:element ref="storage" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="environment" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="signatureInformation" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="relationship" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingEventIdentifier" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingIntellectualEntityIdentifier" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingRightsStatementIdentifier" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:attribute name="xmlID" type="xs:ID"/>
				<xs:attribute name="version" type="versionSimpleType" use="optional"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!--
*********** representation
  	-->
	<xs:complexType name="representation">
		<xs:complexContent>
			<xs:extension base="objectComplexType">
				<xs:sequence>
					<xs:element ref="objectIdentifier" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element ref="preservationLevel" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="significantProperties" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="originalName" minOccurs="0" maxOccurs="1"/>
					<xs:element ref="environment" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="relationship" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingEventIdentifier" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingIntellectualEntityIdentifier" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingRightsStatementIdentifier" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:attribute name="xmlID" type="xs:ID"/>
			<xs:attribute name="version" type="versionSimpleType" use="optional"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!--
*********** bitstream
  	-->
	<xs:complexType name="bitstream">
		<xs:complexContent>
			<xs:extension base="objectComplexType">
				<xs:sequence>
					<xs:element ref="objectIdentifier" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element ref="significantProperties" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="objectCharacteristics" minOccurs="1" maxOccurs="unbounded"/>
					<xs:element ref="storage" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="environment" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="signatureInformation" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="relationship" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingEventIdentifier" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingIntellectualEntityIdentifier" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="linkingRightsStatementIdentifier" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:attribute name="xmlID" type="xs:ID"/>
			<xs:attribute name="version" type="versionSimpleType" use="optional"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- 	

************************************eventComplexType

-->
	<xs:complexType name="eventComplexType">
		<xs:sequence>
			<xs:element ref="eventIdentifier" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="eventType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="eventDateTime" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="eventDetail" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="eventOutcomeInformation" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="linkingAgentIdentifier" type="eventLinkingAgentIdentifierComplexType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="linkingObjectIdentifier" type="eventLinkingObjectIdentifierComplexType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="xmlID" type="xs:ID"/>
		
		<xs:attribute name="version" type="versionSimpleType" use="optional"/>
	</xs:complexType>
	<!-- 	
                      
**************************  agentComplexType

-->
	<xs:complexType name="agentComplexType">
		<xs:sequence>
			<xs:element ref="agentIdentifier" minOccurs="1" maxOccurs="unbounded"/>
			<xs:element ref="agentName" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="agentType" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
		<xs:attribute name="xmlID" type="xs:ID"/>
		<xs:attribute name="version" type="versionSimpleType" use="optional"/>
	</xs:complexType>
	<!-- 	

******************* rightsComplexType (plus rightsStatementComplexType)

-->
	<xs:complexType name="rightsComplexType">
		<xs:choice maxOccurs="unbounded">
			<xs:element ref="rightsStatement"/>
			<xs:element ref="rightsExtension"/>
		</xs:choice>
		<xs:attribute name="xmlID" type="xs:ID"/>
		<xs:attribute name="version" type="versionSimpleType" use="optional"/>
	</xs:complexType>
	<!-- 	

******* rightsStatementComplexType
-->
	<xs:complexType name="rightsStatementComplexType">
		<xs:sequence>
			<xs:element ref="rightsStatementIdentifier" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="rightsBasis" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="copyrightInformation" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="licenseInformation" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="statuteInformation" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="rightsGranted" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="linkingObjectIdentifier" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="linkingAgentIdentifier" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--

**************************additional complexType definitions  **********************
-->
	<!-- 	

******* agentIdentifierComplexType
-->
	<xs:complexType name="agentIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="agentIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="agentIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--
****************contentLocationComplexType
-->
	<xs:complexType name="contentLocationComplexType">
		<xs:sequence>
			<xs:element ref="contentLocationType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="contentLocationValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--
******** copyrightInformationComplexType
-->
	<xs:complexType name="copyrightInformationComplexType">
		<xs:sequence>
			<xs:element ref="copyrightStatus" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="copyrightJurisdiction" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="copyrightStatusDeterminationDate" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="copyrightNote" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
****************creatingApplicationComplexType
-->
	<xs:complexType name="creatingApplicationComplexType">
		<!-- All four elements individually are optional and so the following structure is necessary to ensure that at least one occurs -->
		<xs:choice>
			<xs:sequence>
				<xs:element ref="creatingApplicationName" minOccurs="1" maxOccurs="1"/>
				<xs:element ref="creatingApplicationVersion" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="dateCreatedByApplication" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="creatingApplicationExtension" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:sequence>
				<xs:element ref="creatingApplicationVersion" minOccurs="1" maxOccurs="1"/>
				<xs:element ref="dateCreatedByApplication" minOccurs="0" maxOccurs="1"/>
				<xs:element ref="creatingApplicationExtension" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:sequence>
				<xs:element ref="dateCreatedByApplication" minOccurs="1" maxOccurs="1"/>
				<xs:element ref="creatingApplicationExtension" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:element ref="creatingApplicationExtension" minOccurs="1" maxOccurs="unbounded"/>
		</xs:choice>
	</xs:complexType>
	<!--  
****************dependencyComplexType
-->
	<xs:complexType name="dependencyComplexType">
		<xs:sequence>
			<xs:element ref="dependencyName" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="dependencyIdentifier" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************dependencyIdentifierComplexType
-->
	<xs:complexType name="dependencyIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="dependencyIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="dependencyIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************environmentComplexType
-->
	<xs:complexType name="environmentComplexType">
		<!-- All six elements individually are optional and so the following structure is necessary to ensure that at least one occurs -->
		<xs:choice>
			<!-- -->
			<xs:sequence>
				<xs:element ref="environmentCharacteristic" minOccurs="1" maxOccurs="1"/>
				<xs:element ref="environmentPurpose" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="environmentNote" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="dependency" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="software" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="hardware" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="environmentExtension" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
			<!-- -->
			<xs:sequence>
				<xs:element ref="environmentPurpose" minOccurs="1" maxOccurs="unbounded"/>
				<xs:element ref="environmentNote" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="dependency" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="software" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="hardware" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="environmentExtension" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
			<!-- -->
			<xs:sequence>
				<xs:element ref="environmentNote" minOccurs="1" maxOccurs="unbounded"/>
				<xs:element ref="dependency" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="software" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="hardware" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="environmentExtension" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
			<!-- -->
			<xs:sequence>
				<xs:element ref="dependency" minOccurs="1" maxOccurs="unbounded"/>
				<xs:element ref="software" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="hardware" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="environmentExtension" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
			<!-- -->
			<xs:sequence>
				<xs:element ref="software" minOccurs="1" maxOccurs="unbounded"/>
				<xs:element ref="hardware" minOccurs="0" maxOccurs="unbounded"/>
				<xs:element ref="environmentExtension" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
			<!-- -->
			<xs:sequence>
				<xs:element ref="hardware" minOccurs="1" maxOccurs="unbounded"/>
				<xs:element ref="environmentExtension" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
			<xs:element ref="environmentExtension" minOccurs="1" maxOccurs="1"/>
		</xs:choice>
	</xs:complexType>
	<!--
   ****eventIdentifierComplexType
-->
	<xs:complexType name="eventIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="eventIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="eventIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--
   ****event LinkingAgentIdentifierComplexType
-->
	<xs:complexType name="eventLinkingAgentIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="linkingAgentIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element name="linkingAgentIdentifierValue" type="xs:string" minOccurs="1" maxOccurs="1"/>
			<xs:element name="linkingAgentRole" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="LinkAgentXmlID" type="xs:IDREF" use="optional"/>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--
   ****eventOutcomeDetailComplexType
-->
	<xs:complexType name="eventOutcomeDetailComplexType">
		<xs:sequence>
			<xs:element ref="eventOutcomeDetailNote" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="eventOutcomeDetailExtension" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--
   ****eventOutcomeInformationComplexType
-->
	<xs:complexType name="eventOutcomeInformationComplexType">
		<xs:sequence>
			<xs:element ref="eventOutcome" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="eventOutcomeDetail" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
******* licenseIdentifierComplexType
-->
	<xs:complexType name="licenseIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="licenseIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="licenseIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--
******* licenseInformationComplexType
-->
	<xs:complexType name="licenseInformationComplexType">
		<xs:sequence>
			<xs:element ref="licenseIdentifier" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="licenseTerms" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="licenseNote" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
   ****linkingObjectIdentifierComplexType
-->
	<xs:complexType name="eventLinkingObjectIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="linkingObjectIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="linkingObjectIdentifierValue" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="linkingObjectRole" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="LinkObjectXmlID" type="xs:IDREF" use="optional"/>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--   
*******fixityComplexType
-->
	<xs:complexType name="fixityComplexType">
		<xs:sequence>
			<xs:element ref="messageDigestAlgorithm" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="messageDigest" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="messageDigestOriginator" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
*******formatComplexType
-->
	<xs:complexType name="formatComplexType">
		<xs:sequence>
			<xs:choice>
				<!-- one or both of formatDesignation and/or formatRegistry required -->
				<xs:sequence>
					<xs:element ref="formatDesignation"/>
					<xs:element ref="formatRegistry" minOccurs="0" maxOccurs="1"/>
				</xs:sequence>
				<xs:element ref="formatRegistry"/>
			</xs:choice>
			<xs:element ref="formatNote" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
*******formatDesignationComplexType
-->
	<xs:complexType name="formatDesignationComplexType">
		<xs:sequence>
			<xs:element ref="formatName" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="formatVersion" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--	  
*******formatRegistryComplexType
  -->
	<xs:complexType name="formatRegistryComplexType">
		<xs:sequence>
			<xs:element ref="formatRegistryName" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="formatRegistryKey" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="formatRegistryRole" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--  
****************hardwareComplexType
-->
	<xs:complexType name="hardwareComplexType">
		<xs:sequence>
			<xs:element ref="hwName" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="hwType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="hwOtherInformation" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************inhibitorsComplexType
-->
	<xs:complexType name="inhibitorsComplexType">
		<xs:sequence>
			<xs:element ref="inhibitorType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="inhibitorTarget" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="inhibitorKey" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--
******* linkingAgentIdentifierComplexType
-->
	<xs:complexType name="linkingAgentIdentifierComplexType">
		<xs:sequence>
			<xs:element name="linkingAgentIdentifierType" type="xs:string" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="linkingAgentIdentifierValue" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="linkingAgentRole" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************"linkingEventIdentifierComplexType
-->
	<xs:complexType name="linkingEventIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="linkingEventIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="linkingEventIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
		<xs:attribute name="LinkEventXmlID" type="xs:IDREF" use="optional"/>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--
*******linkingObjectIdentifierComplexType	
-->
	<xs:complexType name="linkingObjectIdentifierComplexType">
		<xs:sequence>
			<xs:element name="linkingObjectIdentifierType" type="xs:string" minOccurs="1" maxOccurs="1"/>
			<xs:element name="linkingObjectIdentifierValue" type="xs:string" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************linkingIntellectualEntityIdentifierComplexType
-->
	<xs:complexType name="linkingIntellectualEntityIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="linkingIntellectualEntityIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="linkingIntellectualEntityIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--  
****************linkingRightsStatementIdentifierComplexType
-->
	<xs:complexType name="linkingRightsStatementIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="linkingRightsStatementIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="linkingRightsStatementIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
		<xs:attribute name="LinkPermissionStatementXmlID" type="xs:IDREF" use="optional"/>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--  
****************objectCharacteristicsComplexType
-->
	<xs:complexType name="objectCharacteristicsComplexType">
		<xs:sequence>
			<xs:element ref="compositionLevel" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="fixity" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="size" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="format" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="creatingApplication" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="inhibitors" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="objectCharacteristicsExtension" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--  	
*******objectIdentifierComplexType
-->
	<xs:complexType name="objectIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="objectIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="objectIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--  
****************originalNameComplexType
-->
	<xs:complexType name="originalNameComplexType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attributeGroup ref="xlink:simpleLink"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<!--  
****************preservationLevelComplexType
-->
	<xs:complexType name="preservationLevelComplexType">
		<xs:sequence>
			<xs:element ref="preservationLevelValue" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="preservationLevelRole" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="preservationLevelRationale" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="preservationLevelDateAssigned" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************relatedEventIdentificationComplexType
-->
	<xs:complexType name="relatedEventIdentificationComplexType">
		<xs:sequence>
			<xs:element ref="relatedEventIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="relatedEventIdentifierValue" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="relatedEventSequence" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
		<xs:attribute name="RelEventXmlID" type="xs:IDREF" use="optional"/>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--  
****************relatedObjectIdentificationComplexType
-->
	<xs:complexType name="relatedObjectIdentificationComplexType">
		<xs:sequence>
			<xs:element ref="relatedObjectIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="relatedObjectIdentifierValue" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="relatedObjectSequence" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
		<xs:attribute name="RelObjectXmlID" type="xs:IDREF" use="optional"/>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--  
****************relationshipComplexType
-->
	<xs:complexType name="relationshipComplexType">
		<xs:sequence>
			<xs:element ref="relationshipType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="relationshipSubType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="relatedObjectIdentification" minOccurs="1" maxOccurs="unbounded"/>
			<xs:element ref="relatedEventIdentification" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
******** rightsGrantedComplexType
-->
	<xs:complexType name="rightsGrantedComplexType">
		<xs:sequence>
			<xs:element ref="act" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="restriction" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="termOfGrant" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="rightsGrantedNote" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
*******rightsStatementIdentifierComplexType
-->
	<xs:complexType name="rightsStatementIdentifierComplexType">
		<xs:sequence>
			<xs:element ref="rightsStatementIdentifierType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="rightsStatementIdentifierValue" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
		<xs:attributeGroup ref="xlink:simpleLink"/>
	</xs:complexType>
	<!--  
****************signatureComplexType
-->
	<xs:complexType name="signatureComplexType">
		<xs:sequence>
			<xs:element ref="signatureEncoding" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="signer" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="signatureMethod" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="signatureValue" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="signatureValidationRules" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="signatureProperties" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="keyInformation" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************signatureInformationComplexType
-->
	<xs:complexType name="signatureInformationComplexType">
		<xs:choice>
			<xs:sequence>
				<xs:element ref="signature" minOccurs="1" maxOccurs="1"/>
				<xs:element ref="signatureInformationExtension" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:element ref="signatureInformationExtension" minOccurs="1" maxOccurs="unbounded"/>
		</xs:choice>
	</xs:complexType>
	<!-- 
****************significantPropertiesComplexType
 -->
	<xs:complexType name="significantPropertiesComplexType">
		<xs:sequence>
			<xs:element ref="significantPropertiesType" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="significantPropertiesValue" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="significantPropertiesExtension" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************softwareComplexType
-->
	<xs:complexType name="softwareComplexType">
		<xs:sequence>
			<xs:element ref="swName" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="swVersion" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="swType" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="swOtherInformation" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="swDependency" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
******* statuteInformationComplexType
-->
	<xs:complexType name="statuteInformationComplexType">
		<xs:sequence>
			<xs:element ref="statuteJurisdiction" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="statuteCitation" minOccurs="1" maxOccurs="1"/>
			<xs:element ref="statuteInformationDeterminationDate" minOccurs="0" maxOccurs="1"/>
			<xs:element ref="statuteNote" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--  
****************storageComplexType
-->
	<xs:complexType name="storageComplexType">
		<xs:choice>
			<xs:sequence>
				<xs:element ref="contentLocation" minOccurs="1" maxOccurs="1"/>
				<xs:element ref="storageMedium" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
			<xs:element ref="storageMedium" minOccurs="1" maxOccurs="1"/>
		</xs:choice>
	</xs:complexType>
	<!--  
****************termOfGrantComplexType
-->
	<xs:complexType name="termOfGrantComplexType">
			<xs:sequence>
				<xs:element ref="startDate" minOccurs="1" maxOccurs="1"/>
				<xs:element ref="endDate" minOccurs="0" maxOccurs="1"/>
			</xs:sequence>
	</xs:complexType>
	<!-- 



*************Element Declarations **********************

****** string type element declarations
 	-->
	<xs:element name="act" type="xs:string"/>
	<xs:element name="agentIdentifierType" type="xs:string"/>
	<xs:element name="agentIdentifierValue" type="xs:string"/>
	<xs:element name="agentName" type="xs:string"/>
	<xs:element name="agentType" type="xs:string"/>
	<xs:element name="contentLocationType" type="xs:string"/>
	<xs:element name="contentLocationValue" type="xs:string"/>
	<xs:element name="copyrightStatus" type="xs:string"/>
	<xs:element name="copyrightJurisdiction" type="xs:string"/>
	<xs:element name="copyrightNote" type="xs:string"/>
	<xs:element name="creatingApplicationName" type="xs:string"/>
	<xs:element name="creatingApplicationVersion" type="xs:string"/>
	<xs:element name="dependencyIdentifierType" type="xs:string"/>
	<xs:element name="dependencyIdentifierValue" type="xs:string"/>
	<xs:element name="dependencyName" type="xs:string"/>
	<xs:element name="environmentCharacteristic" type="xs:string"/>
	<xs:element name="environmentNote" type="xs:string"/>
	<xs:element name="environmentPurpose" type="xs:string"/>
	<xs:element name="eventDetail" type="xs:string"/>
	<xs:element name="eventIdentifierType" type="xs:string"/>
	<xs:element name="eventIdentifierValue" type="xs:string"/>
	<xs:element name="eventOutcome" type="xs:string"/>
	<xs:element name="eventOutcomeDetailNote" type="xs:string"/>
	<xs:element name="formatName" type="xs:string"/>
	<xs:element name="formatNote" type="xs:string"/>
	<xs:element name="formatRegistryName" type="xs:string"/>
	<xs:element name="formatRegistryKey" type="xs:string"/>
	<xs:element name="formatRegistryRole" type="xs:string"/>
	<xs:element name="formatVersion" type="xs:string"/>
	<xs:element name="hwOtherInformation" type="xs:string"/>
	<xs:element name="hwName" type="xs:string"/>
	<xs:element name="hwType" type="xs:string"/>
	<xs:element name="inhibitorKey" type="xs:string"/>
	<xs:element name="inhibitorTarget" type="xs:string"/>
	<xs:element name="inhibitorType" type="xs:string"/>
	<xs:element name="licenseIdentifierType" type="xs:string"/>
	<xs:element name="licenseIdentifierValue" type="xs:string"/>
	<xs:element name="licenseNote" type="xs:string"/>
	<xs:element name="licenseTerms" type="xs:string"/>
	<xs:element name="linkingAgentIdentifierType" type="xs:string"/>
	<xs:element name="linkingAgentIdentifierValue" type="xs:string"/>
	<xs:element name="linkingAgentRole" type="xs:string"/>
	<xs:element name="linkingEventIdentifierType" type="xs:string"/>
	<xs:element name="linkingEventIdentifierValue" type="xs:string"/>
	<xs:element name="linkingIntellectualEntityIdentifierType" type="xs:string"/>
	<xs:element name="linkingIntellectualEntityIdentifierValue" type="xs:string"/>
	<xs:element name="linkingObjectIdentifierType" type="xs:string"/>
	<xs:element name="linkingObjectRole" type="xs:string"/>
	<xs:element name="linkingObjectIdentifierValue" type="xs:string"/>
	<xs:element name="linkingRightsStatementIdentifierType" type="xs:string"/>
	<xs:element name="linkingRightsStatementIdentifierValue" type="xs:string"/>
	<xs:element name="messageDigest" type="xs:string"/>
	<xs:element name="messageDigestAlgorithm" type="xs:string"/>
	<xs:element name="messageDigestOriginator" type="xs:string"/>
	<xs:element name="objectIdentifierType" type="xs:string"/>
	<xs:element name="objectIdentifierValue" type="xs:string"/>
	<xs:element name="preservationLevelValue" type="xs:string"/>
	<xs:element name="preservationLevelRole" type="xs:string"/>
	<xs:element name="preservationLevelRationale" type="xs:string"/>
	<xs:element name="relatedEventIdentifierType" type="xs:string"/>
	<xs:element name="relatedEventIdentifierValue" type="xs:string"/>
	<xs:element name="relatedObjectIdentifierType" type="xs:string"/>
	<xs:element name="relatedObjectIdentifierValue" type="xs:string"/>
	<xs:element name="relationshipType" type="xs:string"/>
	<xs:element name="relationshipSubType" type="xs:string"/>
	<xs:element name="restriction" type="xs:string"/>
	<xs:element name="rightsBasis" type="xs:string"/>
	<xs:element name="rightsGrantedNote" type="xs:string"/>
	<xs:element name="rightsStatementIdentifierType" type="xs:string"/>
	<xs:element name="rightsStatementIdentifierValue" type="xs:string"/>
	<xs:element name="signatureEncoding" type="xs:string"/>
	<xs:element name="signatureMethod" type="xs:string"/>
	<xs:element name="signatureProperties" type="xs:string"/>
	<xs:element name="signatureValue" type="xs:string"/>
	<xs:element name="signatureValidationRules" type="xs:string"/>
	<xs:element name="signer" type="xs:string"/>
	<xs:element name="significantPropertiesType" type="xs:string"/>
	<xs:element name="significantPropertiesValue" type="xs:string"/>
	<xs:element name="storageMedium" type="xs:string"/>
	<xs:element name="statuteCitation" type="xs:string"/>
	<xs:element name="statuteJurisdiction" type="xs:string"/>
	<xs:element name="statuteNote" type="xs:string"/>
	<xs:element name="swName" type="xs:string"/>
	<xs:element name="swVersion" type="xs:string"/>
	<xs:element name="swType" type="xs:string"/>
	<xs:element name="swDependency" type="xs:string"/>
	<xs:element name="swOtherInformation" type="xs:string"/>
	<!-- 
****** complex  types element declarations
 	-->
	<xs:element name="agentIdentifier" type="agentIdentifierComplexType"/>
	<xs:element name="contentLocation" type="contentLocationComplexType"/>
	<xs:element name="copyrightInformation" type="copyrightInformationComplexType"/>
	<xs:element name="creatingApplication" type="creatingApplicationComplexType"/>
	<xs:element name="dependencyIdentifier" type="dependencyIdentifierComplexType"/>
	<xs:element name="dependency" type="dependencyComplexType"/>
	<xs:element name="environment" type="environmentComplexType"/>
	<xs:element name="eventIdentifier" type="eventIdentifierComplexType"/>
	<xs:element name="eventOutcomeDetail" type="eventOutcomeDetailComplexType"/>
	<xs:element name="eventOutcomeInformation" type="eventOutcomeInformationComplexType"/>
	<xs:element name="eventType" type="xs:string"/>
	<xs:element name="fixity" type="fixityComplexType"/>
	<xs:element name="format" type="formatComplexType"/>
	<xs:element name="formatDesignation" type="formatDesignationComplexType"/>
	<xs:element name="formatRegistry" type="formatRegistryComplexType"/>
	<xs:element name="hardware" type="hardwareComplexType"/>
	<xs:element name="inhibitors" type="inhibitorsComplexType"/>
	<xs:element name="licenseIdentifier" type="licenseIdentifierComplexType"/>
	<xs:element name="licenseInformation" type="licenseInformationComplexType"/>
	<xs:element name="linkingAgentIdentifier" type="linkingAgentIdentifierComplexType"/>
	<xs:element name="linkingEventIdentifier" type="linkingEventIdentifierComplexType"/>
	<xs:element name="linkingIntellectualEntityIdentifier" type="linkingIntellectualEntityIdentifierComplexType"/>
	<xs:element name="linkingObjectIdentifier" type="linkingObjectIdentifierComplexType"/>
	<xs:element name="linkingRightsStatementIdentifier" type="linkingRightsStatementIdentifierComplexType"/>
	<xs:element name="objectCharacteristics" type="objectCharacteristicsComplexType"/>
	<xs:element name="objectIdentifier" type="objectIdentifierComplexType"/>
	<xs:element name="originalName" type="originalNameComplexType"/>
	<xs:element name="preservationLevel" type="preservationLevelComplexType"/>
	<xs:element name="relatedEventIdentification" type="relatedEventIdentificationComplexType"/>
	<xs:element name="relatedObjectIdentification" type="relatedObjectIdentificationComplexType"/>
	<xs:element name="relationship" type="relationshipComplexType"/>
	<xs:element name="rightsGranted" type="rightsGrantedComplexType"/>
	<xs:element name="rightsStatement" type="rightsStatementComplexType"/>
	<xs:element name="rightsStatementIdentifier" type="rightsStatementIdentifierComplexType"/>
	<xs:element name="signature" type="signatureComplexType"/>
	<xs:element name="signatureInformation" type="signatureInformationComplexType"/>
	<xs:element name="significantProperties" type="significantPropertiesComplexType"/>
	<xs:element name="statuteInformation" type="statuteInformationComplexType"/>
	<xs:element name="software" type="softwareComplexType"/>
	<xs:element name="storage" type="storageComplexType"/>
	<xs:element name="termOfGrant" type="termOfGrantComplexType"/>
	<!-- 
****** other xs  type  element declarations
 	-->
	<xs:element name="compositionLevel" type="xs:nonNegativeInteger"/>
	<xs:element name="relatedEventSequence" type="xs:nonNegativeInteger"/>
	<xs:element name="relatedObjectSequence" type="xs:nonNegativeInteger"/>
	<xs:element name="size" type="xs:long"/>
	<!-- 
****** date type  element declarations
 	-->
	<xs:element name="dateCreatedByApplication" type="edtfSimpleType"/>
		<xs:element name="endDate" type="edtfSimpleType"/>
	<xs:element name="copyrightStatusDeterminationDate" type="edtfSimpleType"/>
	<xs:element name="eventDateTime" type="edtfSimpleType"/>
	<xs:element name="preservationLevelDateAssigned" type="edtfSimpleType"/>
			<xs:element name="startDate" type="edtfSimpleType"/>
	<xs:element name="statuteInformationDeterminationDate" type="edtfSimpleType"/>
	
	<!-- 
****** extension  type  element declarations
 	-->
	<xs:element name="creatingApplicationExtension" type="extensionComplexType"/>
	<xs:element name="environmentExtension" type="extensionComplexType"/>
	<xs:element name="eventOutcomeDetailExtension" type="extensionComplexType"/>
	<xs:element name="keyInformation" type="extensionComplexType"/>
	<xs:element name="objectCharacteristicsExtension" type="extensionComplexType"/>
	<xs:element name="rightsExtension" type="extensionComplexType"/>
	<xs:element name="signatureInformationExtension" type="extensionComplexType"/>
	<xs:element name="significantPropertiesExtension" type="extensionComplexType"/>
	<!-- 
*** date
-->
	<!--
************************************ Global Definitions  ***********************************************************************


************** version definition
-->

	<xs:simpleType name="versionSimpleType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="2.0"/>
		</xs:restriction>
	</xs:simpleType>
	<!--  
****************	extensionComplexType	
-->
	<xs:complexType name="extensionComplexType">
		<xs:sequence>
			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!-- 	

***********************************date/time Definition  ***********************************************************************

Extended Date/Time Format: edtf

************************* edtfSimpleType

edtfSimpleType is the union of three simple types - xsDate, xs:dateTime, and edtfRegularExpressions. ("union" means that any string conforming to any one of the types in the union will validate.)  xs:date and xs:dateTime are built-in W3Cschema types.  edtfRegularExpressions is a set of four regular expressions which are described below. So any string that conforms to one of the two built-in types or any of the four regular expressions will validate. 
 -->
	<xs:simpleType name="edtfSimpleType">
		<xs:union memberTypes="xs:date xs:dateTime edtfRegularExpressions"/>
	</xs:simpleType>
	<!-- 
******** edft
-->
	<xs:simpleType name="edtfRegularExpressions">
		<xs:restriction base="xs:string">
			<!--  
The following pattern is for year (yyyy) or year-month (yyyy-mm)              
The last or last two digits of year may be '?'  meaning "one year in that range but not sure which year", for example 19?? means some year from 1990 to 1999.  Similarly month may be '??' so that 2004-?? "means some month in 2004".  And the entire string may end with '?' or '~' for "uncertain" or "approximate".
Hyphen must separate year and month.
-->
			<xs:pattern value="\d{2}(\d{2}|\?\?|\d(\d|\?))(-(\d{2}|\?\?))?~?\??"/>
			<!--  
The following pattern is for  yearMonthDay - yyyymmdd,  where 'dd' may be '??'  so '200412??' means "some day during the month of 12/2004". 
The whole  string may be followed by '?' or '~'  to mean "questionable" or "approximate".     hyphens are  not allowed for this pattern. 
-->
			<xs:pattern value="\d{6}(\d{2}|\?\?)~?\??"/>
			<!--  

The following pattern is for  date and time with  T separator:'yyyymmddThhmmss'. 
hyphens in date and colons in time not allowed for this pattern.   
-->
			<xs:pattern value="\d{8}T\d{6}"/>
			<!--  

The following pattern is for  a date range.  in years:  'yyyy/yyyy'; or year/month: yyyy-mm/yyyy-mm.    Beginning or end of range value may be 'UNKNOWN'. End of range value may be 'OPEN'.
hyphens mandatory when month is present. 
-->
			<xs:pattern value="((\d{4}(-\d{2})?)|UNKNOWN)/((\d{4}(-\d{2})?)|UNKNOWN|OPEN)"/>
			<!-- -->
		</xs:restriction>
	</xs:simpleType>
	<!-- -->
</xs:schema>

