<?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 Partnership Income Tax Schema - IRS Form 1065 Schedule B-2</Description>
			<TaxYear>2018</TaxYear>
			<MaturityLevel>Final Release</MaturityLevel>
			<ReleaseDate>October 17, 2018</ReleaseDate>
		</xsd:documentation>
	</xsd:annotation>
	<xsd:include schemaLocation="../../../Common/efileTypes.xsd"/>
	<!-- =============================================================== -->
	<!-- ==================  IRS Form 1065 Schedule B-2 ================== -->
	<!-- =============================================================== -->
	<xsd:element name="IRS1065ScheduleB2">
		<xsd:annotation>
			<xsd:documentation>IRS Form 1065 Schedule B-2 - Election Out of Partnership Level Tax Treatment Filers</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="IRS1065ScheduleB2Type">
					<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="IRS1065ScheduleB2">
						<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="IRS1065ScheduleB2Type">
		<xsd:annotation>
			<xsd:documentation>Content model for Form 1065 Schedule B-2</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<!--== IRS1065 Schedule B-2 - Part I  List of Eligible Partners Use the following codes under Type of Entity:  	== -->
			<!--== 				I - Individual C - Corporation E - Estate F - Foreign S - S Corporation 							== -->
			<xsd:element name="PartnerListGrp" type="PartnerListGrpType" minOccurs="0" maxOccurs="unbounded"/>
			<!--== IRS1065 Schedule B-2 - Part II List of S Corporation Shareholders (For each S corporation partner, ==-->
			<!--== complete a separate Part II and separate Part V, if needed.) ==-->
			<xsd:element name="SCorpShareholderListGrp" type="SCorpShareholderListGrpType" minOccurs="0" maxOccurs="unbounded"/>
			<!-- == IRS1065 Schedule B-2 - Part III Total Number of Schedules K-1 required to be issued. See instructions. == -->
			<!--== Total SchK1 Issued Partnership Count ==-->
			<xsd:element name="TotalSchK1IssuedPrtshpCnt"  minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Total SchK1 Issued Partnership Count</Description>
						<LineNumber>Line 1</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="IntegerNNType">
						<xsd:totalDigits value="8"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- Total SchK1 Issued SCorp Partnership Count -->
			<xsd:element name="TotalSchK1IssuedSCorpPrtnrCnt"  minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Total SchK1 Issued SCorp Partnership Count</Description>
						<LineNumber>Line 2</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="IntegerNNType">
						<xsd:totalDigits value="8"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
			<!-- Total K1 Issued Count -->
			<xsd:element name="TotalK1IssuedCnt"  minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Total K1 Issued Count</Description>
						<LineNumber>Line 3</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="IntegerNNType">
						<xsd:totalDigits value="8"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ============================================================== -->
	<!-- == Part I  List of Eligible Partners Use the following codes under Type of Entity:      == -->
	<!-- ==  I - Individual C - Corporation E - Estate F - Foreign S - S Corporation                == -->
	<!-- ============================================================== -->
	<xsd:complexType name="PartnerListGrpType">
		<xsd:annotation>
			<xsd:documentation>Content model for Form 1065 Schedule B-2 Part I</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:choice minOccurs="1" maxOccurs="1">
				<xsd:element name="PartnerBusinessName" type="BusinessNameType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Partner Business Name</Description>
							<LineNumber>Schedule B-2 Part I</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="PartnerPersonNm" type="PersonNameType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Partner Person Name</Description>
							<LineNumber>Schedule B-2 Part I</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>
			<xsd:choice minOccurs="0" maxOccurs="1">
				<xsd:element name="EIN" type="EINType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>EIN</Description>
							<LineNumber>Schedule B-2 Part I</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="MissingEINReasonCd">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Missing EIN Reason Code</Description>
							<LineNumber>Schedule B-2 Part I</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:element name="SSN" type="SSNType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>SSN</Description>
							<LineNumber>Schedule B-2 Part I</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>
			<xsd:element name="EntityTypeCd">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Entity Type Code</Description>
						<LineNumber>Schedule B-2 Part I</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="TextType">
						<xsd:enumeration value="I"/>
						<xsd:enumeration value="C"/>
						<xsd:enumeration value="E"/>
						<xsd:enumeration value="F"/>
						<xsd:enumeration value="S"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ========================================================== -->
	<!-- == Part II List of S Corporation Shareholders (For each S corporation partner, 	==-->
	<!--== complete a separate Part II and separate Part V, if needed.) 						== -->
	<!-- =========================================================== -->
	<xsd:complexType name="SCorpShareholderListGrpType">
		<xsd:annotation>
			<xsd:documentation>Content model for Form 1065 Schedule B-2 Part II</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="PartnerBusinessName" type="BusinessNameType" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Partner Business Name</Description>
						<LineNumber>Schedule B-2 Part II</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="EIN" type="EINType" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>
						<Description>EIN</Description>
						<LineNumber>Schedule B-2 Part II</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="ShareholderGrp" type="ShareholderGrpType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ============================================================== -->
	<!-- == Part II List of S Corporation Shareholder Group Type== -->
	<!-- ============================================================== -->
	<xsd:complexType name="ShareholderGrpType">
		<xsd:annotation>
			<xsd:documentation>Content model for Form 1065 Schedule B-2  Part II Shareholder Group</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:choice minOccurs="1" maxOccurs="1">
				<xsd:element name="ShareholderBusinessName" type="BusinessNameType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Shareholder Business Name</Description>
							<LineNumber>Schedule B-2 Part II Shareholder Group</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="ShareholderPersonNm" type="PersonNameType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Shareholder Person Name</Description>
							<LineNumber>Schedule B-2 Part II Shareholder Group</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>
			<xsd:choice minOccurs="0" maxOccurs="1">
				<xsd:element name="EIN" type="EINType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>EIN</Description>
							<LineNumber>Schedule B-2 Part II Shareholder Group</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="MissingEINReasonCd">
					<xsd:annotation>
						<xsd:documentation>
							<Description>Missing EIN Reason Code</Description>
							<LineNumber>Schedule B-2 Part II Shareholder Group</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:element name="SSN" type="SSNType">
					<xsd:annotation>
						<xsd:documentation>
							<Description>SSN</Description>
							<LineNumber>Schedule B-2 Part II Shareholder Group</LineNumber>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:choice>
			<xsd:element name="EntityTypeCd">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Entity Type Code</Description>
						<LineNumber>Schedule B-2 Part II Shareholder Group</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="TextType">
						<xsd:enumeration value="I"/>
						<xsd:enumeration value="E"/>
						<xsd:enumeration value="T"/>
						<xsd:enumeration value="O"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
