<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.irs.gov/efile" xmlns="http://www.irs.gov/efile" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<xsd:annotation>
		<xsd:documentation>
			<Description>IRS e-file Schema - Owns Foreign Partnership Statement</Description>
			<TaxYear>2012</TaxYear>
			<MaturityLevel>Draft Release</MaturityLevel>
			<ReleaseDate>September 5, 2012</ReleaseDate>
		</xsd:documentation>
	</xsd:annotation>

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

	<!-- ===================================== -->
	<!-- ====== Owns Foreign Partnership Statement ======= -->
	<!-- ===================================== -->

	<xsd:element name="OwnsForeignPartnershipStmt">
		<xsd:annotation>
			<xsd:documentation>Owns Foreign Partnership Statement</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="OwnsForeignPartnershipStmtType">
					<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="OwnsForeignPartnershipStmt">
						<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>

	<!-- Owns Foreign Partnership Statement -->
	<xsd:complexType name="OwnsForeignPartnershipStmtType">
		<xsd:annotation>
			<xsd:documentation>Owns Foreign Partnership Statement</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>

			<xsd:element name="ForeignPartnership" minOccurs="0" maxOccurs="unbounded">
				<xsd:complexType>
					<xsd:sequence>

						<!-- Name of Foreign Partnership -->
						<xsd:element name="NameOfForeignPartnership" type="BusinessNameType" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>Name of Foreign Partnership</xsd:documentation>
							</xsd:annotation>
						</xsd:element>

						<!-- Choice between EIN, SSN or "APPLD FOR" or "FOREIGNUS" -->
						<xsd:choice minOccurs="0">

							<!-- EIN of Foreign Partnership -->
							<xsd:element name="EINOfForeignPartnership" type="EINType">
								<xsd:annotation>
									<xsd:documentation>
										<Description>EIN of Foreign Partnership</Description>
									</xsd:documentation>
								</xsd:annotation>
							</xsd:element>
							
							<!-- SSN -->
							<xsd:element name="SSN" type="SSNType">
								<xsd:annotation>
									<xsd:documentation>
										<Description>SSN</Description>
									</xsd:documentation>
								</xsd:annotation>
							</xsd:element>	

							<!-- Missing EIN Reason of Foreign Partnership -->
							<xsd:element name="MissingEINOfForeignPartnership">
								<xsd:annotation>
									<xsd:documentation>
										<Description>Missing EIN Reason of Foreign Partnership</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>

						<!-- Other Forms Filed -->
						<xsd:element name="OtherFormsFiled" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>Other Forms Filed</xsd:documentation>
							</xsd:annotation>
							<xsd:simpleType>
								<xsd:list>
									<xsd:simpleType>
										<xsd:restriction base="StringType">
											<xsd:enumeration value="1042"/>
											<xsd:enumeration value="1065"/>
											<xsd:enumeration value="1065-B"/>
											<xsd:enumeration value="8804"/>
										</xsd:restriction>
									</xsd:simpleType>
								</xsd:list>
							</xsd:simpleType>
						</xsd:element>

						<!-- Name of Tax Matters Partner -->
						<xsd:element name="NameOfTaxMattersPartner" type="BusinessNameType" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>Name of Tax Matters Partner</xsd:documentation>
							</xsd:annotation>
						</xsd:element>

						<!-- Foreign Partnership Tax Year Beginning Date -->
						<xsd:element name="ForeignPrtshpTYBeginningDate" type="DateType" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>Foreign Partnership Tax Year Beginning Date</xsd:documentation>
							</xsd:annotation>
						</xsd:element>

						<!-- Foreign Partnership Tax Year Ending Date -->
						<xsd:element name="ForeignPrtshpTaxYearEndingDate" type="DateType" minOccurs="0">
							<xsd:annotation>
								<xsd:documentation>Foreign Partnership Tax Year Ending Date</xsd:documentation>
							</xsd:annotation>
						</xsd:element>

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

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