<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:core="http://schema.omg.org/spec/CTS2/1.0/Core" xmlns="http://schema.omg.org/spec/CTS2/1.0/MapCatalog" targetNamespace="http://schema.omg.org/spec/CTS2/1.0/MapCatalog"
	elementFormDefault="qualified">

	<xs:import namespace="http://schema.omg.org/spec/CTS2/1.0/Core" schemaLocation="../core/Core.xsd"/>
	<!-- ====================================================
		MapCatalogEntry
		======================================================-->
	<xs:element name="MapCatalogEntry" type="MapCatalogEntry">
		<xs:annotation>
			<xs:documentation>An entry in a catalog of maps - organized collections of rules that describe how information encoded using one set of value meanings can be transformed into a second, related set of meanings. A map catalog
				contains information about who is responsible for creating and distributing the rules, the source code system or value set, the target code system or value set, how often the rules are updated, how they are distributed,
				etc.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="MapCatalogEntry">
		<xs:annotation>
			<xs:documentation>An entry in a catalog of maps - organized collections of rules that describe how information encoded using one set of value meanings can be transformed into a second, related set of meanings. A map catalog
				contains information about who is responsible for creating and distributing the rules, the source code system or value set, the target code system or value set, how often the rules are updated, how they are distributed,
				etc.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:AbstractResourceDescription">
				<xs:sequence>
					<xs:element name="fromCodeSystem" type="core:CodeSystemReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>the <i>CodeSystem</i> from which the source codes in the Map are drawn. Note that the source codes may be drawn from either a <i>CodeSystem</i> or a <i>ValueSet</i>, but not
								both.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="fromValueSet" type="core:ValueSetReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>the <i>ValueSet</i> from which the source codes in the Map are drawn. Note that the source codes may be drawn from either a <i>CodeSystem</i> or a <i>ValueSet</i>, but not
								both.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="toCodeSystem" type="core:CodeSystemReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>the <i>CodeSystem</i> from which the target codes in the Map are drawn. Note that the target codes may be drawn from either a <i>CodeSystem</i> or a <i>ValueSet</i>, but not
								both.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="toValueSet" type="core:ValueSetReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>the <i>ValueSet</i> from which the source codes in the Map are drawn. Note that the target codes may be drawn from either a <i>CodeSystem</i> or a <i>ValueSet</i>, but not
								both.</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="versions" type="core:MapVersionDirectoryURI" minOccurs="0">
						<xs:annotation>
							<xs:documentation>a URI that, when resolved, returns the known versions of the containing <i>Map</i></xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="currentVersion" type="core:MapVersionReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>The map version associated with this catalog entry that has been assigned the <i>CURRENT</i> tag, if any</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="mapName" type="core:MapName" use="required">
					<xs:annotation>
						<xs:documentation>the name by which the map is known within the context of the CTS<sub>2</sub> service instance. <i>mapName</i> must uniquely designate a single, abstract <i>Map</i> within the context of all maps
							known to the instance of the service. Note that <i>mapName</i> is not necessarily globally unique and the <i>about</i> URI should be used whenever communication information about the <i>Map</i> across time or
							service instances.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ====================================================
		MapCatalogEntry PSM
		======================================================-->
	<xs:element name="MapCatalogEntryMsg" type="MapCatalogEntryMsg"/>
	<xs:complexType name="MapCatalogEntryMsg">
		<xs:annotation>
			<xs:documentation>A <i>MapCatalogEntry</i> read from a service instance.</xs:documentation>
			<xs:appinfo>PSM</xs:appinfo>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:Message">
				<xs:sequence>
					<xs:element name="map" type="MapCatalogEntry"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<!-- ====================================================
		MapCatalogEntryDirectory
		======================================================-->
	<xs:element name="MapCatalogEntryDirectory" type="MapCatalogEntryDirectory"/>
	<xs:complexType name="MapCatalogEntryDirectory">
		<xs:annotation>
			<xs:documentation>A directory summarizing all or some of the <i>MapCatalogEntries</i> known to the service.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:Directory">
				<xs:sequence>
					<xs:element name="entry" type="MapCatalogEntrySummary" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="MapCatalogEntrySummary">
		<xs:annotation>
			<xs:documentation>A synopsis of a <i>MapCatalogEntry</i>.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:AbstractResourceDescriptionDirectoryEntry">
				<xs:sequence>
					<xs:element name="fromCodeSystem" type="core:CodeSystemReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>the <i>CodeSystem</i> from which the source codes in the Map are drawn</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="fromValueSet" type="core:ValueSetReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>the <i>ValueSet</i> from which the source codes in the Map are drawn</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="toCodeSystem" type="core:CodeSystemReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>the <i>CodeSystem</i> from which the target codes in the Map are drawn</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="toValueSet" type="core:ValueSetReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>the <i>ValueSet</i> from which the source codes in the Map are drawn</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="currentVersion" type="core:MapVersionReference" minOccurs="0">
						<xs:annotation>
							<xs:documentation>a reference to the map version with the <i>CURRENT</i> tag, if any</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="mapName" type="core:MapName" use="required">
					<xs:annotation>
						<xs:documentation>the name by which the map is known within the context of the CTS<sub>2</sub> service instance</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:element name="MapCatalogEntryList" type="MapCatalogEntryList"/>
	<xs:complexType name="MapCatalogEntryList">
		<xs:annotation>
			<xs:documentation>A collection of complete <i>MapCatalogEntry </i>resources that meet a specified criteria.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:Directory">
				<xs:sequence>
					<xs:element name="entry" type="MapCatalogEntryListEntry" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="MapCatalogEntryListEntry">
		<xs:annotation>
			<xs:documentation>A <i>MapCatalogEntry </i>that meets a specified filter criteria.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="core:DirectoryEntry">
				<xs:sequence>
					<xs:element name="entry" type="MapCatalogEntry"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

</xs:schema>
