<?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 - De Minimis Exception Election</Description>
			<TaxYear>2018</TaxYear>
			<MaturityLevel>Final Release</MaturityLevel>
			<ReleaseDate>October 15, 2019</ReleaseDate>
		</xsd:documentation>
	</xsd:annotation>

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


	<!-- ============================================================== -->
	<!-- =============  De Minimis Exception Election ================= -->
	<!-- ============================================================== -->


	<xsd:element name="DeMinimisExceptionElection">
		<xsd:annotation>
			<xsd:documentation>De minimis exception election</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="DeMinimisExceptionElectionType">
					<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="DeMinimisExceptionElection">
						<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:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>	
	
	<xsd:complexType name="DeMinimisExceptionElectionType">
		<xsd:annotation>
			<xsd:documentation>Content model for de minimis exception election</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>		
				
			<!-- De Minimis Exception -->
			<xsd:element name="DeMinimisExceptionGrp" type="DeMinimisExceptionGrpType" minOccurs="0" maxOccurs="unbounded">	
				<xsd:annotation>
					<xsd:documentation>
						<Description>De minimis exception</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			
		</xsd:sequence>
	</xsd:complexType>		

	<!-- Type for Repeating Group - De Minimis Exception -->
	<xsd:complexType name="DeMinimisExceptionGrpType">
		<xsd:sequence>		

			<!-- Choice between Corporation Name or Person Name -->
			<xsd:choice minOccurs="0">

				<!-- Corporation Name -->
				<xsd:element name="CorporationName" type="BusinessNameType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Corporation Name</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Person Name -->
				<xsd:element name="PersonNm" type="PersonNameType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Person Name</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

			</xsd:choice>
		
			<!-- Choice between Corporation EIN, Person SSN or Missing EIN Reason -->
			<xsd:choice minOccurs="0">

				<!-- Corporation EIN -->
				<xsd:element name="CorporationEIN" type="EINType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Corporation EIN</Description>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>			

				<!-- Person SSN -->
				<xsd:element name="SSN" type="SSNType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Person SSN</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="StringType">
							<xsd:enumeration value="APPLD FOR"/>
							<xsd:enumeration value="FOREIGNUS"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

			</xsd:choice>
			
			<!-- Effective Date of Election -->
			<xsd:element name="ElectionEffectiveDt" type="DateType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Effective date of election</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>				
			
			<!-- Type Trade/Business that Involve Long-term Contracts -->
			<xsd:element name="TradeOrBusinessDesc" type="LineExplanationType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Type trade/business that involve long-term contracts</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>							
						
		</xsd:sequence>
	</xsd:complexType>	
	
</xsd:schema>
