<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.irs.gov/efile" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.irs.gov/efile" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">

	<xsd:annotation>
		<xsd:documentation>
			<Description>IRS e-file Corporate Income Tax Schema - IRS Form 8838</Description>
			<TaxYear>2018</TaxYear>
			<MaturityLevel>Final Release</MaturityLevel>
			<ReleaseDate>September 5, 2018</ReleaseDate>
		</xsd:documentation>
	</xsd:annotation>

	<xsd:include schemaLocation="../../../Common/efileTypes.xsd"/>


	<!-- =============================================================== -->
	<!-- ======================  IRS Form 8838 ========================= -->
	<!-- =============================================================== -->

 
	<xsd:element name="IRS8838">
		<xsd:annotation>
			<xsd:documentation>IRS Form 8838</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="IRS8838Type">
					<xsd:attributeGroup ref="DocumentAttributes">
						<xsd:annotation>
							<xsd:documentation>Common return document attributes</xsd:documentation>
						</xsd:annotation>
					</xsd:attributeGroup>
					<xsd:attribute name="documentName" type="xsd:string" fixed="IRS8838">
						<xsd:annotation>
							<xsd:documentation>IRS internal use only. To avoid error in the return, do not include the attribute name or value.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>

					<xsd:attribute name="referenceDocumentId" type="IdListType"/>
					<xsd:attribute name="referenceDocumentName" type="StringType" fixed="BinaryAttachment"/>

				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="IRS8838Type">
		<xsd:annotation>
			<xsd:documentation>Content model for Form 8838</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>

			<!-- Name(s) of Consenting Taxpayer(s) (Business or Person) -->
			<xsd:choice minOccurs="0">
			
				<!-- Name(s) of Consenting Taxpayer(s) -->
				<xsd:element name="TaxpayerName" type="BusinessNameType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Name(s) of consenting taxpayer(s)</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Name(s) of Consenting Taxpayer(s) -->
				<xsd:element name="TaxpayerNm" type="PersonNameType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Name(s) of consenting taxpayer(s)</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>

			<!-- Identifying Number Of Payor Of Income (SSN, EIN or Missing EIN Reason) -->
			<xsd:choice minOccurs="0">
			
				<!-- SSN -->
				<xsd:element name="SSN" type="SSNType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>SSN</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				
				<!-- Identifying Number -->
				<xsd:element name="EIN" type="EINType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>EIN</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			
				<!-- Missing EIN Reason -->
				<xsd:element name="MissingEINReasonCd">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Missing EIN reason</Description>
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="TextType">
							<xsd:enumeration value="APPLD FOR"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
			</xsd:choice>

			<!-- Spouse SSN -->
			<xsd:element name="SpouseSSN" type="SSNType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Spouse SSN</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		
			<!-- USAddress or ForeignAddress -->
			<xsd:choice minOccurs="0">

				<!-- Address -->
				<xsd:element name="USAddress" type="USAddressType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Address</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Foreign Address -->
				<xsd:element name="ForeignAddress" type="ForeignAddressType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Foreign address</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>

			<!-- Tax Year End Date -->
			<xsd:element name="TaxYearEndDt" type="DateType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Tax year end date</Description>
						<LineNumber>1</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Expiration Date -->
			<xsd:element name="ExpirationDt" type="DateType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Expiration date</Description>
						<LineNumber>1</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Date of Transfer -->
			<xsd:element name="TransferredDt" type="DateType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Date of transfer</Description>
						<LineNumber>5a</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Description of Property Transferred -->
			<xsd:element name="PropertyDesc" type="ShortExplanationType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Description of property transferred</Description>
						<LineNumber>5b</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Name of Transferee -->
			<xsd:element name="TransfereeName" type="BusinessNameType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Name of transferee</Description>
						<LineNumber>5c</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- EIN of Transferee or EIN Missing Reason -->
			<xsd:choice minOccurs="0">
				
				<!-- EIN of Transferee -->
				<xsd:element name="TransfereeEIN" type="EINType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>EIN of transferee</Description>
							<LineNumber>5c</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			
				<!-- EIN Missing Reason -->
				<xsd:element name="EINMissingReasonCd">
					<xsd:annotation>
						<xsd:documentation>
							<Description>EIN missing reason</Description>
							<LineNumber>5c</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="TextType">
							<xsd:enumeration value="APPLD FOR"/>
							<xsd:enumeration value="FOREIGNUS"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
			</xsd:choice>

		</xsd:sequence>

	</xsd:complexType>

</xsd:schema>
