<?xml version="1.0" encoding="UTF-8"?>
<!-- ********************************************************************************** -->
<!-- IBM SVN information                                                    			-->
<!-- Version:         $Revision: 7085 $													-->
<!-- LastChangedDate: $LastChangedDate: 2017-08-23 16:53:46 +0200 (Mi, 23 Aug 2017) $  	-->
<!-- LastChangedBy:   $LastChangedBy: r.petermann@de.ibm.com $						   	-->
<!-- ********************************************************************************** -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:payload="http://paymentorder.justice.eu/Payload/V3_0"
	version="3.3">
	
	<xsd:include schemaLocation="BusinessTypes.xsd" />
	<xsd:include schemaLocation="SimpleTypes.xsd" />
	<xsd:include schemaLocation="CatalogTypes.xsd" />

	<xsd:element name="Formsheet" type="FormsheetType" abstract="true" />

	<xsd:element name="Formsheet_A" type="Formsheet_A_Type" substitutionGroup="Formsheet">
		<xsd:key name="PartyKey">
			<xsd:selector xpath=".//payload:Formsheet_A/Party" />
			<xsd:field xpath="@id" />
		</xsd:key>
		<xsd:key name="ClaimKey">
			<xsd:selector xpath=".//payload:Formsheet_A/Claim" />
			<xsd:field xpath="@id" />
		</xsd:key>
		<xsd:keyref name="AsRepresentativeRef" refer="PartyKey">
			<xsd:selector xpath=".//payload:Formsheet_A/Party/AsRepresentative/Represented" />
			<xsd:field xpath="@ref" />
		</xsd:keyref>
		<xsd:keyref name="EvidenceClaimRef" refer="ClaimKey">
			<xsd:selector xpath=".//payload:Formsheet_A/Evidence/Claim" />
			<xsd:field xpath="@ref" />
		</xsd:keyref>
		<xsd:keyref name="InterestClaimRef" refer="ClaimKey">
			<xsd:selector xpath=".//payload:Formsheet_A/Interest/Claim" />
			<xsd:field xpath="@ref" />
		</xsd:keyref>
	</xsd:element>

	<xsd:complexType name="FormsheetType" abstract="true">
		<xsd:sequence>
			<xsd:element maxOccurs="unbounded" minOccurs="1" name="Party" type="PartyType" />   							<!-- 2. Parteien und 6. Hauptforderung(Gläubiger)  -->
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:group name="TotalClaimGroup">
		<xsd:sequence>
			<xsd:element name="AmountOfTotalClaim" type="Double_12_2_Value" />   		<!-- 6. Hauptforderung - Gesamtforderung Betrag -->
			<xsd:element name="CurrencyOfTotalClaim" type="CurrencyCatalogType" />	<!-- 6. Hauptforderung - Gesamtforderung Währung --> <!-- changed from OpenCurrencyCatalogType in 2.0 -->
		</xsd:sequence>
	</xsd:group>

	<xsd:complexType name="Formsheet_A_Type">
		<xsd:complexContent>
			<xsd:extension base="FormsheetType">
				<xsd:sequence>
					<xsd:element maxOccurs="1" minOccurs="0" name="AdditionalStatement" type="String_16384_Value" />   		<!-- 11. Zusätzliche Erklärung --><!-- max length 16384 since 1.0.1 -->
					<xsd:element maxOccurs="1" minOccurs="0" name="AmountOfPenalty" type="Double_12_2_Value" />   			<!-- 8. Vertragsstrafe - Betrag -->
					<xsd:element maxOccurs="1" minOccurs="0" name="ApplicationLanguage" type="LanguageOfProposalCatalogType" /> <!-- since 2.3.1 -->
					<xsd:element maxOccurs="1" minOccurs="0" name="Assignment" type="BooleanValue" /> 						<!-- 6. Hauptforderung - Abtretung -->				
					<xsd:element maxOccurs="1" minOccurs="1" name="ConsumerContract" type="BooleanValue" />   				<!-- 6. Hauptforderung - Verbrauchervertrag --><!--  since 1.1.0 -->
					<xsd:element maxOccurs="10" minOccurs="1" name="CountryOfClaimant" type="ISOCountryCatalogType" />  		<!-- 4. Grenzüberschreitung - Land Antragssteller -->
					<xsd:element maxOccurs="1" minOccurs="1" name="CountryOfCourt" type="ISOCountryCatalogType" />   			<!-- 4. Grenzüberschreitung - Land Gericht -->
					<xsd:element maxOccurs="10" minOccurs="1" name="CountryOfDefendant" type="ISOCountryCatalogType" /> 		<!-- 4. Grenzüberschreitung - Land Antragsgegner -->
					<xsd:element maxOccurs="1" minOccurs="0" name="DefendantConsumer" type="BooleanValue" />   				<!-- 6. Hauptforderung - Antragsgegener ist Verbraucher -->
					<xsd:element maxOccurs="1" minOccurs="0" name="DomicileOfDefendant" type="BooleanValue" />   			<!-- 6. Hauptforderung - Antragsgegener Wohnsitz -->
					<xsd:element maxOccurs="1" minOccurs="0" name="ExplanationOfPayment" type="String_128_Value" />			<!-- 5. Bankverbindung - Erklärung -->
					<xsd:element maxOccurs="1" minOccurs="0" name="KindOfPayment" type="KindOfPaymentCatalogType" />		<!-- 5. Bankverbindung - Zahlungsart -->
					<xsd:element maxOccurs="1" minOccurs="0" name="SpecificationOfPenalty" type="String_128_Value" />   	<!-- 8. Vertragsstrafe - Erläuterung -->
					<xsd:group maxOccurs="1" minOccurs="0" ref="TotalClaimGroup" />
					<xsd:element maxOccurs="1" minOccurs="1" name="ApplicationConfirmation" type="ConfirmationType" />		<!-- Bestätigung Formblatt A -->
					<xsd:element maxOccurs="unbounded" minOccurs="0" name="Claim" type="ClaimType" />   					<!-- 6. Hauptforderung - Forderung -->
					<xsd:element maxOccurs="unbounded" minOccurs="0" name="Cost" type="CostType" />   						<!-- 9. Kosten -->
					<xsd:element maxOccurs="unbounded" minOccurs="0" name="Evidence" type="EvidenceType" />					<!-- 10. Beweismittel -->
					<xsd:element maxOccurs="unbounded" minOccurs="0" name="Interest" type="InterestType" />					<!-- 7. Zinsen -->
					<xsd:element maxOccurs="unbounded" minOccurs="0" name="Jurisdiction" type="JurisdictionType" />			<!-- 3. Gerichtliche Zuständigkeit -->
					<xsd:element maxOccurs="1" minOccurs="0" ref="MeansOfCollection" />										<!-- Anlage 1 - Einzugsmittel -->
					<xsd:element maxOccurs="1" minOccurs="0" ref="MeansOfDeposit" />										<!-- 5. Bankverbindung - Einzahlungsmittel ? -->
					<xsd:element maxOccurs="1" minOccurs="0" name="RejectionOfTransfer" type="RejectionOfTransferType" />	<!-- Anlage 2 - Ablehnung der Überleitung -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<!-- since 2.0 -->
	<xsd:complexType name="Formsheet_B_Type">
		<xsd:complexContent>
			<xsd:extension base="FormsheetType">
				<xsd:sequence>
					<xsd:element name="Confirmation" type="OutgoingConfirmationType" />
					<xsd:element name="EndOfPeriod" type="DateValue" />
					<xsd:element name="ReasonOfProposal" minOccurs="0" maxOccurs="unbounded" type="ReasonOfProposalType" /> <!-- since 2.2.0 -->
					<xsd:element name="Language" minOccurs="0" maxOccurs="unbounded" type="LanguageType" /> <!-- since 2.2. --> <!-- LanguageType since 2.3 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
	<!-- since 2.0 -->
	<xsd:complexType name="Formsheet_C_Type">
		<xsd:complexContent>
			<xsd:extension base="FormsheetType">
				<xsd:sequence>
					<xsd:element name="Confirmation" type="OutgoingConfirmationType" />
					<xsd:element name="EndOfPeriod" type="DateValue"/>		
					<xsd:element name="TextOfProposal" type="String_16384_Value"/> 	<!-- since 2.2.0 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<!-- since 2.0 -->
	<xsd:complexType name="Formsheet_D_Type">
		<xsd:complexContent>
			<xsd:extension base="FormsheetType">
				<xsd:sequence>
					<xsd:element name="Confirmation" type="OutgoingConfirmationType" />	
					<xsd:element name="ReasonOfRejection" maxOccurs="unbounded" type="ReasonOfRejectionType" /> <!-- since 2.2.0 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<!-- new in 3.0 -->
	<xsd:complexType name="Formsheet_F_Type">
		<xsd:complexContent>
			<xsd:extension base="FormsheetType">
				<xsd:sequence>
					<xsd:element name="IssueDateOfPaymentOrder" type="DateValue" />	
					<xsd:element name="Confirmation" type="ConfirmationType" />	
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<!-- since 2.0 -->
	<xsd:complexType name="Formsheet_G_Type">
		<xsd:complexContent>
			<xsd:extension base="FormsheetType">
				<xsd:sequence>
					<xsd:element name="Confirmation" type="OutgoingConfirmationType" />
					<xsd:element name="DateOfService" type="DateValue" />
					<xsd:element name="DateOfDecision" type="DateValue" /> <!-- since 2.2.0 -->
					<xsd:choice>
						<xsd:element maxOccurs="unbounded" name="Defendant" type="ReferenceType"/> <!-- reference to FormsheetType/Party@id--> <!-- "unbounded" since 2.3.1 -->
						<xsd:element maxOccurs="unbounded" name="SimpleDefendant" type="xsd:string"/> <!-- since 3.0 -->
					</xsd:choice>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<!-- since 2.0 -->
	<xsd:complexType name="LetterType">
		<xsd:complexContent>
			<xsd:extension base="FormsheetType"> <!-- since in 2.2 -->
				<xsd:sequence>
					<!-- <xsd:element name="Confirmation" type="OutgoingConfirmationType" /> --><!-- since 3.0 -->			
					<xsd:element name="Subject" type="String_256_Value" minOccurs="0"/> <!-- since in 2.2 -->
					<xsd:element name="TextOfLetter" type="String_16384_Value"/> <!-- since in 2.2 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<!-- new in 3.0 -->
	<xsd:complexType name="AcceptanceOfProposalType">
		<xsd:complexContent>
			<xsd:extension base="FormsheetType">
				<xsd:sequence>
					<xsd:element name="AcceptanceOfProposal" type="BooleanValue" />
					<xsd:element name="Confirmation" type="ConfirmationType" />
					<xsd:element name="DateOfProposal" type="DateValue" minOccurs="0"/> <!-- optional since 2.3 -->
					<xsd:element name="TextOfProposal" type="String_16384_Value" minOccurs="0"/>  <!-- since 2.3 -->
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

</xsd:schema>
