<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="urn:ihe:iti:xds-b:2007"  xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:tns="urn:ihe:iti:xds-b:2007" targetNamespace="urn:ihe:iti:xds-b:2007" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" schemaLocation="rs.xsd"/>
	<xs:import namespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" schemaLocation="rim.xsd"/>
	<xs:import namespace="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" schemaLocation="lcm.xsd"/>
	<xs:import namespace="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" schemaLocation="query.xsd"/>
	<xs:import namespace="http://www.w3.org/2004/08/xop/include" schemaLocation="xop.xsd"/>
	<xs:complexType name="RetrieveDocumentSetRequestType">
		<xs:sequence>
			<xs:element name="DocumentRequest" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="HomeCommunityId" type="rim:LongName" minOccurs="0">
							<xs:annotation>
								<xs:documentation>This corresponds to the home attribute of the Identifiable class in regrep RIM (regrep-rim-3.0-os.pdf, page 20)</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="RepositoryUniqueId" type="rim:LongName">
							<xs:annotation>
								<xs:documentation>This is the XDSDocumentEntry.repositoryUniqueId attribute in the XDS metadata</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="DocumentUniqueId" type="rim:LongName">
							<xs:annotation>
								<xs:documentation>This is the XDSDocumentEntry.uniqueId attribute in the XDS metadata</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="RetrieveDocumentSetResponseType">
		<xs:sequence>
			<xs:element ref="rs:RegistryResponse"/>
			<xs:sequence minOccurs="0">
				<xs:element name="DocumentResponse" maxOccurs="unbounded">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="HomeCommunityId" type="rim:LongName" minOccurs="0">
								<xs:annotation>
									<xs:documentation>This corresponds to the home attribute of the Identifiable class in regrep RIM (regrep-rim-3.0-os.pdf, page 20)</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="RepositoryUniqueId" type="rim:LongName">
								<xs:annotation>
									<xs:documentation>This is the XDSDocumentEntry.repositoryUniqueId attribute in the XDS metadata</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="DocumentUniqueId" type="rim:LongName">
								<xs:annotation>
									<xs:documentation>This is the XDSDocumentEntry.uniqueId attribute in the XDS metadata</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="NewRepositoryUniqueId" type="rim:LongName" minOccurs="0"/>
							<xs:element name="NewDocumentUniqueId" type="rim:LongName" minOccurs="0"/>
							<xs:element name="mimeType" type="rim:LongName"/>
							<xs:element name="Document" type="tns:DocumentType"/>												
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:sequence>
	</xs:complexType>

<xs:complexType name="DocumentType">
  <xs:sequence>
    <xs:element ref="xop:Include"/>
  </xs:sequence>
</xs:complexType>
	
	
	<xs:element name="RetrieveDocumentSetRequest" type="RetrieveDocumentSetRequestType"/>
	<xs:element name="RetrieveDocumentSetResponse" type="RetrieveDocumentSetResponseType"/>
	<!--used-->	
	<xs:element name="ProvideAndRegisterDocumentSetRequest" type="ProvideAndRegisterDocumentSetRequestType"/>
	<xs:complexType name="ProvideAndRegisterDocumentSetRequestType">
		<xs:sequence>
			<xs:element ref="lcm:SubmitObjectsRequest"/>
			<xs:sequence minOccurs="0">
				<xs:element name="Document" maxOccurs="unbounded">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="xs:base64Binary" xmime:expectedContentTypes="application/octet-stream">
								<xs:attribute name="id" type="xs:anyURI" use="required">
									<xs:annotation>
										<xs:documentation>This corresponds to the ExtrinsicObject id in the eb RIM metadata a provides a linkage between the actual document data and its metadata</xs:documentation>
									</xs:annotation>
								</xs:attribute>
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:sequence>
	</xs:complexType>
	<!--used-->


</xs:schema>