<?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 8864</Description>
			<TaxYear>2018</TaxYear>
			<MaturityLevel>Final Release</MaturityLevel>
			<ReleaseDate>October 15, 2019</ReleaseDate>
		</xsd:documentation>
	</xsd:annotation>
	<xsd:include schemaLocation="../../../Common/efileTypes.xsd"/>

	<!-- ===================================================================== -->
	<!-- =======================	IRS Form 8864 ============================ -->
	<!-- ===================================================================== -->

	<xsd:element name="IRS8864">
		<xsd:annotation>
			<xsd:documentation>IRS Form 8864</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="IRS8864Type">
					<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="IRS8864">
						<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:annotation>
							<xsd:documentation>List of document ID's of forms, schedules, supporting info. etc. attached to this form</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
					<xsd:attribute name="referenceDocumentName" type="StringType" fixed="BinaryAttachment EvidencePreviouslyFiledClaimForBiodieselSoldorUsedStatement"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<!-- ============================================= -->
	<!-- Biodiesel and Renewable Diesel Fuels Credit   -->
	<!-- ============================================= -->

	<!-- ======== Type of Fuel ======== -->
	<xsd:complexType name="IRS8864Type">
		<xsd:annotation>
			<xsd:documentation>Content model for IRS Form 8864</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>

			<!-- Biodiesel (in gallons) -->
			<xsd:element name="BiodieselGallonsQty" type="FuelGallonsType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Biodiesel (in gallons)</Description>
						<LineNumber>Line 1 Column (a)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Biodiesel amount (Column (a) x Column (b)) -->
			<xsd:element name="BiodieselAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Biodiesel amount (Column (a) x Column (b))</Description>
						<LineNumber>Line 1 Column (c)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Agri-biodiesel - gallons -->
			<xsd:element name="AgriBiodieselGallonsQty" type="FuelGallonsType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Agri-biodiesel (in gallons)</Description>
						<LineNumber>Line 2 Column (a)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Agri-biodiesel - amount (Column (a) x Column (b)) -->
			<xsd:element name="AgriBiodieselAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Agri-biodiesel amount (Column (a) x Column (b))</Description>
						<LineNumber>Line 2 Column (c)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Renewable diesel (in gallons) -->
			<xsd:element name="RenewableDieselGallonsQty" type="FuelGallonsType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Renewable diesel (in gallons)</Description>
						<LineNumber>Line 3 Column (a)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Renewable diesel (Column (a) x Column (b)) -->
			<xsd:element name="RenewableDieselAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Renewable diesel amount (Column (a) x Column (b))</Description>
						<LineNumber>Line 3 Column (c)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Biodiesel mixture (in gallons) -->
			<xsd:element name="BiodieselMixtureGallonsQty" type="FuelGallonsType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Biodiesel mixture (in gallons)</Description>
						<LineNumber>Line 4 Column (a)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Biodiesel mixture amount (Column (a) x Column (b)) -->
			<xsd:element name="BiodieselMixAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Biodiesel mixture amount (Column (a) x Column (b))</Description>
						<LineNumber>Line 4 Column (c)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Agri-biodiesel included in a biodiesel mixture -->
			<xsd:element name="AgriBiodieselIncludedGalsQty" type="FuelGallonsType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Agri-biodiesel included in a biodiesel mixture (in gallons)</Description>
						<LineNumber>Line 5 Column (a)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Agri-Biodiesel included in a biodiesel mixture - amount -->
			<xsd:element name="AgriBiodieselIncludedAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Agri-Biodiesel included in a biodiesel mixture - amount (Column (a) x Column (b))</Description>
						<LineNumber>Line 5 Column (c)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Renewable diesel included in renewable mixture (in gallons) -->
			<xsd:element name="RenewableDieselMixtureGalsQty" type="FuelGallonsType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Renewable diesel included in renewable mixture (in gallons)</Description>
						<LineNumber>Line 6 Column (a)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Renewable diesel included in renewable mixture (Column (a) x Column (b)) -->
			<xsd:element name="RenewableDieselInclMixtureAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Renewable diesel included in renewable mixture (Column (a) x Column (b))</Description>
						<LineNumber>Line 6 Column (c)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Qualified agri-biodiesel production(in gallons) -->
			<xsd:element name="QualifiedAgriBioDieselProdQty" type="FuelGallonsType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Qualified agri-biodiesel production(in gallons)</Description>
						<LineNumber>Line 7 Column (a)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Qualified agri-biodiesel production (Column (a) x Column (b)) -->
			<xsd:element name="QualifiedAgriBioDieselProdAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Qualified agri-biodiesel production (Column (a) x Column (b))</Description>
						<LineNumber>Line 7 Column (c)</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Add lines 1 through 7 -->
			<xsd:element name="BiodieselPlusAgriBioDieselAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Add lines 1 through 7</Description>
						<LineNumber>Line 8</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Biodiesel and renewable diesel fuels amount(s) -->
			<xsd:element name="BiodieselRenewableFuelsAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Biodiesel and renewable diesel fuels amount(s)</Description>
						<LineNumber>Line 9</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Add Lines 8 and 9 -->
			<xsd:element name="TotalBiodieselAndRnwblFuelsAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Add lines 8 and 9</Description>
						<LineNumber>Line 10</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Amount Allocated to Beneficiaries -->
			<xsd:element name="AllocatedToBeneficiariesAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Amount allocated to beneficiaries</Description>
						<LineNumber>Line 11</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Estates, Trusts and Coops Credit  -->
			<xsd:element name="EstatesTrustsAndCoopCreditAmt" type="USAmountType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Estates, trusts and coops credit</Description>
						<LineNumber>Line 12</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

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

</xsd:schema>
