<?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 Schema - Form 1120 Schedule UTP</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 1120 Schedule UTP ======================== -->
	<!-- ============================================================================ -->

	<xsd:element name="IRS1120ScheduleUTP">
		<xsd:annotation>
			<xsd:documentation>IRS Form 1120 Schedule UTP</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="IRS1120ScheduleUTPType">
					<xsd:attributeGroup ref="DocumentAttributes">
						<xsd:annotation>
							<xsd:documentation>Common return document attributes</xsd:documentation>
						</xsd:annotation>
					</xsd:attributeGroup>
					<xsd:attribute name="documentName" type="StringType" fixed="IRS1120ScheduleUTP">
						<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="IRS1120ScheduleUTPType">
		<xsd:annotation>
			<xsd:documentation>Content model for Form 1120 Schedule UTP</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>

			<!-- ===== Part I Uncertain Tax Positions For the Current Tax Year ===== -->

			<!-- Unable to Obtain Related Party Info to Determine Whether UTP -->
			<xsd:element name="UnableObtainRltdPrtyInfoCYInd" type="CheckboxType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Unable to obtain related party info to determine whether UTP</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Uncertain Tax Positions Current TY Info For Part I  -->
			<xsd:element name="CurrentTYUTPInformationGrp" type="CurrentTYUTPInformationGrpType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Schedule UTP information current TY</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			
			<!-- ===== Part II Uncertain Tax Positions for Prior Tax Years ===== -->			
			<!-- ===== Unable to Obtain Related Party Info to Determine Whether UTP ===== -->			

			
			<!-- Unable to Obtain Related Party Info II  -->
			<xsd:element name="UnableObtainRltdPrtyInfoPYInd" type="CheckboxType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Unable to obtain related party info to determine whether UTP</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>			
			
			<!-- Uncertain Tax Positions Prior TY Info For Part II  -->
			<xsd:element name="PriorTYUTPInformationGrp" type="PriorTYUTPInformationGrpType" minOccurs="0" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Schedule UTP information prior TY</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

		</xsd:sequence>
	</xsd:complexType>


	<!-- ===== Type for Repeating Elements in Part I (Current Tax Year) ===== -->

	<xsd:complexType name="CurrentTYUTPInformationGrpType">
		<xsd:annotation>
			<xsd:documentation>Content model for Part I</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>

			<!-- UTP Number -->
			<xsd:element name="UTPNum">
				<xsd:annotation>
					<xsd:documentation>
						<Description>UTP Number</Description>
						<LineNumber>Part I Column A</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="TextType">
						<xsd:pattern value="C[1-9][0-9]{0,3}"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>

			<!-- IRC Sections -->
			<xsd:element name="IRCSections" type="IRCSectionsType" minOccurs="0" maxOccurs="3">
				<xsd:annotation>
					<xsd:documentation>
						<Description>IRC sections</Description>
						<LineNumber>Part I Column B</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Timing Codes: Permanent or Temporary or Both -->
			<xsd:choice>

				<!-- Permanent Timing Code -->
				<xsd:element name="PermanentTimingCodeInd" type="CheckboxType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Permanent timing code</Description>
							<LineNumber>Part I Column C</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Temporary Timing Code -->
				<xsd:element name="TemporaryTimingCodeInd" type="CheckboxType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Temporary timing code</Description>
							<LineNumber>Part I Column C</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Both Timing Codes -->
				<xsd:element name="BothTimingCodesInd" type="CheckboxType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Both timing codes</Description>
							<LineNumber>Part I Column C</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

			</xsd:choice>

			<!-- Pass-Through Entity EIN or Missing EIN Reason -->
			<xsd:choice minOccurs="0">

				<!-- Pass-Through Entity EIN -->
				<xsd:element name="PassThroughEntityEIN" type="EINType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Pass-Through entity EIN</Description>
							<LineNumber>Part I Column D</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Missing EIN Reason -->
				<xsd:element name="MissingEINReasonCd">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Missing EIN reason</Description>
							<LineNumber>Part I Column D</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="StringType">
							<xsd:enumeration value="F"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

			</xsd:choice>

			<!-- Major Tax Position -->
			<xsd:element name="MajorTaxPositionInd" type="CheckboxType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Major tax position</Description>
						<LineNumber>Part I Column E</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Choice between: Transfer Pricing Tax Position or Other Tax Position  -->
			<xsd:choice>

				<!-- Transfer Pricing Tax Position -->
				<xsd:element name="TransferPricingTaxPostionCd" type="TransferPricingTaxPostionType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Transfer Pricing tax position</Description>
							<LineNumber>Part I Column F</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Other Tax Position -->
				<xsd:element name="OtherTaxPositionCd" type="OtherTaxPositionType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Other tax position</Description>
							<LineNumber>Part I Column F</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

			</xsd:choice>
			
			<!-- Title TBD -->
			<xsd:element name="TitleTBDInd" type="CheckboxType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Title TBD</Description>
						<LineNumber>Part I Column G</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Part I Concise Descriptions of UTPs -->
			<xsd:element name="ConciseUTPDesc" type="ExplanationType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Concise description of UTPs</Description>
						<LineNumber>Part III</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

		</xsd:sequence>
	</xsd:complexType>
	
	
	<!-- ===== Type for Repeating Elements in Part II (Prior Tax Year) ===== -->

	<xsd:complexType name="PriorTYUTPInformationGrpType">
		<xsd:annotation>
			<xsd:documentation>Content model for Part II</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>

			<!-- UTP Number -->
			<xsd:element name="UTPNum">
				<xsd:annotation>
					<xsd:documentation>
						<Description>UTP Number</Description>
						<LineNumber>Part II Column A</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="TextType">
						<xsd:pattern value="P[1-9][0-9]{0,3}"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>

			<!-- IRC Sections -->
			<xsd:element name="IRCSections" type="IRCSectionsType" minOccurs="0" maxOccurs="3">
				<xsd:annotation>
					<xsd:documentation>
						<Description>IRC sections</Description>
						<LineNumber>Part II Column B</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Timing Codes: Permanent or Temporary or Both -->
			<xsd:choice>

				<!-- Permanent Timing Code -->
				<xsd:element name="PermanentTimingCodeInd" type="CheckboxType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Permanent timing code</Description>
							<LineNumber>Part II Column C</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Temporary Timing Code -->
				<xsd:element name="TemporaryTimingCodeInd" type="CheckboxType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Temporary timing code</Description>
							<LineNumber>Part II Column C</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Both Timing Codes -->
				<xsd:element name="BothTimingCodesInd" type="CheckboxType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Both timing codes</Description>
							<LineNumber>Part II Column C</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

			</xsd:choice>

			<!-- Pass-Through Entity EIN or Missing EIN Reason -->
			<xsd:choice minOccurs="0">

				<!-- Pass-Through Entity EIN -->
				<xsd:element name="PassThroughEntityEIN" type="EINType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Pass-Through entity EIN</Description>
							<LineNumber>Part II Column D</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Missing EIN Reason -->
				<xsd:element name="MissingEINReasonCd">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Missing EIN reason</Description>
							<LineNumber>Part II Column D</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
					<xsd:simpleType>
						<xsd:restriction base="StringType">
							<xsd:enumeration value="F"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>

			</xsd:choice>

			<!-- Major Tax Position -->
			<xsd:element name="MajorTaxPositionInd" type="CheckboxType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Major tax position</Description>
						<LineNumber>Part II Column E</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Choice between: Transfer Pricing Tax Position or Other Tax Position  -->
			<xsd:choice>

				<!-- Transfer Pricing Tax Position -->
				<xsd:element name="TransferPricingTaxPostionCd" type="TransferPricingTaxPostionType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Transfer Pricing tax position</Description>
							<LineNumber>Part II Column F</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<!-- Other Tax Position -->
				<xsd:element name="OtherTaxPositionCd" type="OtherTaxPositionType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Other tax position</Description>
							<LineNumber>Part II Column F</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

			</xsd:choice>
			
			<!-- Title TBD -->
			<xsd:element name="TitleTBDInd" type="CheckboxType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Title TBD</Description>
						<LineNumber>Part II Column G</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>				
			
			<!-- Tax Year of Position -->
			<xsd:element name="TaxPositionYearDt" type="YearMonthType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Tax year of position in YYYY-MM format</Description>
						<LineNumber>Part II Column H</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>			

			<!-- Part II Concise Descriptions of UTPs -->
			<xsd:element name="ConciseUTPDesc" type="ExplanationType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Concise description of UTPs</Description>
						<LineNumber>Part III</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

		</xsd:sequence>
	</xsd:complexType>
	
	<!-- ===== Type for Repeating Element in Part I and Part II (IRC Sections) ===== -->

	<xsd:complexType name="IRCSectionsType">
		<xsd:annotation>
			<xsd:documentation>Content model for Part I and Part II</xsd:documentation>
		</xsd:annotation>

		<xsd:sequence>

			<!-- Primary IRC Sections -->
			<xsd:element name="PrimaryIRCSectionsNum">
				<xsd:simpleType>
					<xsd:restriction base="AlphaNumericType">
						<xsd:pattern value="[A-Z0-9]{1,7}"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>


			<!-- Primary IRC Sub Section 1st Parenthesis  -->
			<xsd:element name="PrimaryIRCSubSectionNum" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="TextType">
						<xsd:pattern value="[a-z]"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>


			<!-- Primary IRC Sub Section 2nd Parenthesis -->
			<xsd:element name="PrimaryIRCParagraphNum" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="IntegerType">
						<xsd:totalDigits value="2"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>

			<!-- Primary IRC Sub Section 3rd Parenthesis -->
			<xsd:element name="PrimaryIRCSubParagraphNum" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="TextType">
						<xsd:pattern value="[A-Z]"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>

			<!-- Primary IRC Sub Section 4th Parenthesis -->
			<xsd:element name="PrimaryIRCClauseNum" minOccurs="0">
				<xsd:simpleType>
					<xsd:restriction base="TextType">
						<xsd:pattern value="[ivx]{1,6}"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>

		</xsd:sequence>

	</xsd:complexType>


	<!-- Valuation Tax Position Type -->
	<xsd:simpleType name="ValuationTaxPositionType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="(V[1-9][0-9]{0,3})"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!-- Transfer Pricing Tax Postion Type -->
	<xsd:simpleType name="TransferPricingTaxPostionType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="(T[1-9][0-9]{0,3})"/>
		</xsd:restriction>
	</xsd:simpleType>

	<!-- Other Tax Position Type -->
	<xsd:simpleType name="OtherTaxPositionType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="(G[1-9][0-9]{0,3})"/>
		</xsd:restriction>
	</xsd:simpleType>

</xsd:schema>
