<?xml version="1.0" encoding="UTF-8"?>
<!--   
 National Highway Traffic Safety Administration (NHTSA)
 Manufacturer Communications Index 
 V 1.0
-->
<xsd:schema targetNamespace="https://www.nhtsa.gov/vehicle-manufacturers/manufacturer-communications" 
	xmlns:nhtsa="https://www.nhtsa.gov/vehicle-manufacturers/manufacturer-communications" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="1.0" xml:lang="EN">
	<xsd:element name="IndexOfMfrCommunications">
		<xsd:annotation>
			<xsd:documentation>Index of Manufacturer (MFR) Communications</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="MfrCommunications">
					<xsd:complexType>
						<xsd:sequence>
							<!-- This is the parent element for each communication. -->
							<xsd:element name="Communication" type="nhtsa:CommunicationType" maxOccurs="unbounded"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
			<!-- Specifies the NHTSA schema version to use.-->
			<xsd:attribute name="NHTSASchemaVersion" type="xsd:decimal" use="required" fixed="1.0"/>
		</xsd:complexType>
	</xsd:element>

	<!-- Communication Type Declaration -->
	<xsd:complexType name="CommunicationType">
		<xsd:sequence>
			<!-- This field contains numerical digits and represents the sequential number of manufacturer communications being submitted. 
			     It should always start at 1 and continue sequentially, with the largest number equaling the total number of communications 
			     submitted with the index.
			-->
			<xsd:element name="No" type="xsd:positiveInteger"/>
			
			<!-- TSB / Document ID  -->
			<xsd:element name="TsbOrDocumentID">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:whiteSpace value="collapse"/>
						<xsd:minLength value="1"/>
						<xsd:maxLength value="25"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			
			<!-- The communication was disseminated by the manufacturer. -->
			<xsd:element name="MfrCommDate" type="nhtsa:MyDate"/>
			
			<!-- MFR Internal Campaign ID / Software Version.  -->
			<xsd:element name="MfrInternalCampaignIdOrSoftwareVersion">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:whiteSpace value="collapse"/>
						<xsd:maxLength value="128"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			
			<!-- Type of communication being submitted. -->
			<xsd:element name="CommType" type="nhtsa:CommTypeType"/>
			
			<!-- Type of communication being submitted. -->
			<xsd:element name="Documents" >
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Document" type="nhtsa:DocumentsType" maxOccurs="1"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>	
			
		
			<xsd:element name="Products" >
				<xsd:complexType>
					<xsd:sequence>
						<!-- The product involved in the communication. One element per product. -->
						<xsd:element name="Product" type="nhtsa:ProductsType" maxOccurs="unbounded"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>	
			
			<xsd:element name="Components" >
				<xsd:complexType>
					<xsd:sequence>
						<!-- The NHTSA components involved in the communication. -->
						<xsd:element name="NHTSAComp" type="nhtsa:ComponentCodesType" minOccurs="1" maxOccurs="5"/>
						
						<!-- The component system involved in the communication in the manufacturer's nomenclature. -->
						<xsd:element name="MfrCompSystem">
							<xsd:simpleType>
								<xsd:restriction base="xsd:string">
									<xsd:whiteSpace value="collapse"/>
									<xsd:maxLength value="128"/>
								</xsd:restriction>
							</xsd:simpleType>
						</xsd:element>
						
						<!-- The component subsystem involved in the communication in the manufacturer's nomenclature. -->						
						<xsd:element name="MfrCompSubSystem">
							<xsd:simpleType>
								<xsd:restriction base="xsd:string">
									<xsd:whiteSpace value="collapse"/>
									<xsd:maxLength value="128"/>
								</xsd:restriction>
							</xsd:simpleType>
						</xsd:element>						
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>	
						
			<!-- A brief description of the communication’s most pertinent information, any related vehicle component information,
			     and the general purpose for the communication. 
			-->			
			<xsd:element name="ConciseSummary">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="1"/>
						<xsd:whiteSpace value="collapse"/>
						<xsd:maxLength value="4000"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<!-- ComponentCodes Type Declaration -->
	<xsd:simpleType name="ComponentCodesType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Air Bags">
				<xsd:annotation>
					<xsd:documentation>Air Bags</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Body">
				<xsd:annotation>
					<xsd:documentation>Body</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Brakes">
				<xsd:annotation>
					<xsd:documentation>Brakes</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Electrical">
				<xsd:annotation>
					<xsd:documentation>Electrical</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Engine">
				<xsd:annotation>
					<xsd:documentation>Engine</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>			
			<xsd:enumeration value="Fuel/Propulsion System">
				<xsd:annotation>
					<xsd:documentation>Fuel/Propulsion System</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Lighting">
				<xsd:annotation>
					<xsd:documentation>Lighting</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Power Train">
				<xsd:annotation>
					<xsd:documentation>Power Train</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Seat Belts">
				<xsd:annotation>
					<xsd:documentation>Seat Belts</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Seats">
				<xsd:annotation>
					<xsd:documentation>Seats</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>	
			<xsd:enumeration value="Speed Control">
				<xsd:annotation>
					<xsd:documentation>Speed Control</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>					
			<xsd:enumeration value="Steering">
				<xsd:annotation>
					<xsd:documentation>Steering</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Suspension">
				<xsd:annotation>
					<xsd:documentation>Suspension</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Visibility/Wiper">
				<xsd:annotation>
					<xsd:documentation>Visibility/Wiper</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Wheels">
				<xsd:annotation>
					<xsd:documentation>Wheels</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Other/I Am Not Sure">
				<xsd:annotation>
					<xsd:documentation>Other/I Am Not Sure</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>				
			<xsd:enumeration value="Adaptive Cruise Control">
				<xsd:annotation>
					<xsd:documentation>Adaptive Cruise Control</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Automatic Emergency Braking">
				<xsd:annotation>
					<xsd:documentation>Automatic Emergency Braking</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Blind Spot Warning">
				<xsd:annotation>
					<xsd:documentation>Blind Spot Warning</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Forward Collision Warning">
				<xsd:annotation>
					<xsd:documentation>Forward Collision Warning</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="Lane Departure Warning">
				<xsd:annotation>
					<xsd:documentation>Lane Departure Warning</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>	
			<xsd:enumeration value="Lane Keeping Assistance">
				<xsd:annotation>
					<xsd:documentation>Lane Keeping Assistance</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>	
			<xsd:enumeration value="Parking Collision Warning">
				<xsd:annotation>
					<xsd:documentation>Parking Collision Warning</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>	
			<xsd:enumeration value="Rear Cross Traffic Warning">
				<xsd:annotation>
					<xsd:documentation>Rear Cross Traffic Warning</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>	
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- MyDate Type Declaration -->
	<xsd:simpleType name="MyDate">
		<xsd:restriction base="xsd:date">
			<xsd:pattern value="\d{4}-[0-1]{1}\d{1}-[0-3]{1}\d{1}"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- Products Type Declaration -->
	<xsd:complexType name="ProductsType">
		<xsd:sequence>
			<xsd:element name="Make">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:minLength value="1"/>
						<xsd:maxLength value="25"/>
						<xsd:whiteSpace value="collapse"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="Model">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:maxLength value="256"/>
						<xsd:minLength value="1"/>
						<xsd:whiteSpace value="collapse"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<xsd:element name="ModelYear">
				<xsd:simpleType>
					<xsd:restriction base="xsd:gYear">
						<xsd:pattern value="\d{4}"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<!-- Communication Type Declaration -->	
	<xsd:simpleType name="CommTypeType">
		<xsd:restriction base="xsd:string">
		<xsd:length value="3"/> 
			<xsd:enumeration value="SBR">
				<xsd:annotation>
					<xsd:documentation>Service Bulletin / Repair Instructions</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="SCA">
				<xsd:annotation>
					<xsd:documentation>Service Campaign</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="WPE">
				<xsd:annotation>
					<xsd:documentation>Warranty Program / Extension</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="OTA">
				<xsd:annotation>
					<xsd:documentation>Over The Air</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="EMI">
				<xsd:annotation>
					<xsd:documentation>Emissions</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="OTH">
				<xsd:annotation>
					<xsd:documentation>Other</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>


	<xsd:simpleType name="FileNameType">
		<xsd:restriction base="xsd:string">
			<xsd:minLength value="5"/>
			<xsd:maxLength value="150"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- "Documents" Type Declaration -->
	<xsd:complexType name="DocumentsType">
		<xsd:sequence>
			
			<!-- The communication document. -->
			<xsd:element name="DocumentType" type="nhtsa:DocumentTypeType"/>
			
			<!-- The PDF file name of the communication document. Must be PDF. The ContainsPII attribute must be set appropriately.
				If the communication document has PII:			
					1) Add one FileName element with the name of the communication document containing PII.
					   Set the ContainsPII attribute to Y. 
					2) Add a second FileName element with the name of the communication document in #1 but with the PII redacted.  
					   Set the ContainsPII attribute to N. 
					   
				If the communication document does NOT have PII:			
					Add one FileName element with the name of the communication document without PII.
					Set the ContainsPII attribute to N.  
			-->
			<xsd:element name="FileName" minOccurs="1" maxOccurs="2">
				<xsd:complexType>
					<xsd:simpleContent>
						<xsd:extension base="nhtsa:FileNameType">
							<xsd:attribute name="containsPII" type="nhtsa:PiiType"/>
						</xsd:extension>
					</xsd:simpleContent>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<!-- "Document Type" Type Declaration -->	
	<xsd:simpleType name="DocumentTypeType">
		<xsd:restriction base="xsd:string">
		<xsd:length value="3"/>
			<xsd:enumeration value="DEA">
				<xsd:annotation>
					<xsd:documentation>Dealer Letter</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="OWN">
				<xsd:annotation>
					<xsd:documentation>Owner Letter</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="BUL">
				<xsd:annotation>
					<xsd:documentation>Bulletin</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="OTH">
				<xsd:annotation>
					<xsd:documentation>Other</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>
	
	<!-- PII Type Declaration -->	
	<xsd:simpleType name="PiiType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Y">
				<xsd:annotation>
					<xsd:documentation>Yes</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="N">
				<xsd:annotation>
					<xsd:documentation>No</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>
	
</xsd:schema>