<?xml version="1.0" encoding="UTF-8"?>
<!-- 
* ***************************************************************************
fee-sheet_en.xfo 2010  June
 ****************************************************************************
Contacts:                                                      			       
R. Brookes		
***************************************************************************** 
revision history

*****************************************************************************
Draft version 1.0  01 June 2010 
***************************************************************************** 
-->
<xsl:stylesheet version="1.0" xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform xslt.xsd" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions"
                xmlns:LU="lookup-table" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan">
	<!-- Start reading the source tree-->
	<xsl:template match="/fee-sheet">
		<fo:root font-family="arialuni">
			<!-- set master layout -->
			<fo:layout-master-set>
				<fo:simple-page-master master-name="A4" page-height="297mm" page-width="210mm" margin-top="0.75cm" margin-bottom="0.75cm" margin-left="12.7mm" margin-right="12.7mm">
					<fo:region-body margin-top="3mm" margin-bottom="9mm"/>
					<fo:region-before extent="3mm"/>
					<fo:region-after extent="6mm"/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-reference="A4">
				<fo:flow flow-name="xsl-region-body">
					<!--+++++++++++++++++++++++++-->
					<!-- Start of header section -->
					<!--+++++++++++++++++++++++++-->

					<fo:table border-color="black">
						<fo:table-column column-width="10mm"/>
						<fo:table-column column-width="60mm"/>
						<fo:table-column column-width="70mm"/>
						<fo:table-column column-width="5mm"/>
						<fo:table-column column-width="35mm"/>
						<fo:table-body>

							<!--Logo-->

							<xsl:choose>
								<xsl:when test="@ro='ES'">
									<fo:table-row>
										<xsl:variable name="varLOGOPicture1" select="'file:///oepm_logo.jpg'"/>
										<fo:table-cell number-columns-spanned="5" text-align="left">
											<fo:block>
												<fo:external-graphic content-width="250" scaling="uniform">
													<xsl:attribute name="src">
														<xsl:value-of select="$varLOGOPicture1"/>
													</xsl:attribute>
												</fo:external-graphic>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:when>

								<xsl:when test="@ro='EP'">
									<fo:table-row>
										<xsl:variable name="varLOGOPicture1" select="'file:///EPO_BL.png'"/>
										<fo:table-cell number-columns-spanned="3" text-align="left">
											<fo:block>
												<fo:external-graphic content-width="150" scaling="uniform">
													<xsl:attribute name="src">
														<xsl:value-of select="$varLOGOPicture1"/>
													</xsl:attribute>
												</fo:external-graphic>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell number-columns-spanned="2" text-align="left">
											<fo:block font-size="9pt" space-after="0pt">80298 München</fo:block>
											<fo:block font-size="9pt" space-after="0pt">Deutschland</fo:block>
											<fo:block font-size="9pt" space-after="0pt">Tel. +49(0)89 2399-0</fo:block>
											<fo:block font-size="9pt" space-after="5pt">Fax +49(0)89 4465</fo:block>
										</fo:table-cell>
									</fo:table-row>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="3" text-align="left">
											<fo:block/>
										</fo:table-cell>
										<fo:table-cell number-columns-spanned="2" text-align="left">
											<fo:block font-size="9pt" space-after="0pt">PO Box 5818</fo:block>
											<fo:block font-size="9pt" space-after="0pt">NL-2280 HV Rijswijk</fo:block>
											<fo:block font-size="9pt" space-after="0pt">Niederlande</fo:block>
											<fo:block font-size="9pt" space-after="0pt">Tel. +31 703404500</fo:block>
											<fo:block font-size="9pt" space-after="10pt">Fax +31 703404600</fo:block>
										</fo:table-cell>
									</fo:table-row>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="3" text-align="left">
											<fo:block/>
										</fo:table-cell>
										<fo:table-cell number-columns-spanned="2" text-align="left">
											<fo:block font-size="9pt" space-after="0pt">10958 Berlin</fo:block>
											<fo:block font-size="9pt" space-after="0pt">Deutschland</fo:block>
											<fo:block font-size="9pt" space-after="0pt">Tel. +49(0)30 25901-0</fo:block>
											<fo:block font-size="9pt" space-after="1pt">Fax +49(0)30 840</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:when>

								<xsl:when test="@ro='SE'">
									<fo:table-row>
										<xsl:variable name="varLOGOPicture2" select="'file:///PRV.png'"/>
										<fo:table-cell number-columns-spanned="5" text-align="right">
											<fo:block>
												<fo:external-graphic content-width="120" scaling="uniform">
													<xsl:attribute name="src">
														<xsl:value-of select="$varLOGOPicture2"/>
													</xsl:attribute>
												</fo:external-graphic>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:when>

								<xsl:when test="@ro='FI'">
									<fo:table-row>
										<xsl:variable name="varLOGOPicture3" select="'file:///PRH.png'"/>
										<fo:table-cell number-columns-spanned="5" text-align="right">
											<fo:block>
												<fo:external-graphic content-width="120" scaling="uniform">
													<xsl:attribute name="src">
														<xsl:value-of select="$varLOGOPicture3"/>
													</xsl:attribute>
												</fo:external-graphic>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:when>

								<xsl:when test="@ro='XN'">
									<fo:table-row>
										<xsl:variable name="varLOGOPicture3" select="'file:///NPI.png'"/>
										<fo:table-cell number-columns-spanned="5" text-align="right">
											<fo:block>
												<fo:external-graphic content-width="250" scaling="uniform">
													<xsl:attribute name="src">
														<xsl:value-of select="$varLOGOPicture3"/>
													</xsl:attribute>
												</fo:external-graphic>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:when>
							</xsl:choose>

							<fo:table-row>
								<fo:table-cell number-columns-spanned="5">
									<fo:block space-before="14pt"/>
								</fo:table-cell>
							</fo:table-row>
							<fo:table-row>
								<!--Title-->
								<fo:table-cell number-columns-spanned="3">
									<fo:block padding-start.length="-1pt" font-size="200%" background-color="#D3D3D3">PCT-Antrag - Gebührenblatt</fo:block>
								</fo:table-cell>
								<fo:table-cell/>
								<!--Office-->
								<fo:table-cell font-size="65%">
									<xsl:choose>
										<xsl:when test="@ro='ES'">
											<!--<fo:block space-after="1pt">Paseo de la Castellana</fo:block>-->
											<fo:block space-after="1pt"></fo:block>
											<!--<fo:block space-after="5pt">75-28046 Madrid</fo:block>-->
											<fo:block space-after="5pt"></fo:block>
											<fo:block>
												<fo:table border-color="black">
													<fo:table-column column-width="15mm"/>
													<fo:table-column column-width="20mm"/>
													<fo:table-body>
														<fo:table-row>
															<fo:table-cell>
																<!--<fo:block space-after="1pt">Telephone</fo:block>
																<fo:block space-after="1pt">Fax</fo:block>-->
																<fo:block space-after="1pt"></fo:block>
																<fo:block space-after="1pt"></fo:block>
															</fo:table-cell>
															<fo:table-cell>
																<!--<fo:block space-after="1pt">913 495 331</fo:block>
																<fo:block space-after="1pt">914 572 586</fo:block>-->
																<fo:block space-after="1pt"></fo:block>
																<fo:block space-after="1pt"></fo:block>
															</fo:table-cell>
														</fo:table-row>
													</fo:table-body>
												</fo:table>
											</fo:block>
											<!--<fo:block space-after="1pt">informacion@oepm.es</fo:block>
											<fo:block space-after="1pt">www.oepm.es</fo:block>-->
											<fo:block space-after="1pt"></fo:block>
											<fo:block space-after="1pt"></fo:block>
										</xsl:when>
										<xsl:when test="@ro='SE'">
											<fo:block space-after="1pt">Box 5055</fo:block>
											<fo:block space-after="5pt">SE-102 42 Stockholm</fo:block>
											<fo:block>
												<fo:table border-color="black">
													<fo:table-column column-width="15mm"/>
													<fo:table-column column-width="20mm"/>
													<fo:table-body>
														<fo:table-row>
															<fo:table-cell>
																<fo:block space-after="1pt">Telephone</fo:block>
																<fo:block space-after="1pt">Fax</fo:block>
															</fo:table-cell>
															<fo:table-cell>
																<fo:block space-after="1pt">+46 8 782 28 00</fo:block>
																<fo:block space-after="1pt">+46 270 173 5</fo:block>
															</fo:table-cell>
														</fo:table-row>
													</fo:table-body>
												</fo:table>
											</fo:block>
											<fo:block space-after="1pt">kundtjanst@prv.se</fo:block>
											<fo:block space-after="1pt">www.prv.se</fo:block>
										</xsl:when>
										<xsl:when test="@ro='FI'">
											<fo:block space-after="1pt">Arkadiankatu 6 A, Helsinki</fo:block>
											<fo:block space-after="5pt">PL 1140, 00101 Helsinki</fo:block>
											<fo:block>
												<fo:table border-color="black">
													<fo:table-column column-width="15mm"/>
													<fo:table-column column-width="20mm"/>
													<fo:table-body>
														<fo:table-row>
															<fo:table-cell>
																<fo:block space-after="1pt">Telephone</fo:block>
																<fo:block space-after="1pt">Fax</fo:block>
															</fo:table-cell>
															<fo:table-cell>
																<fo:block space-after="1pt">09 6939 500</fo:block>
																<fo:block space-after="1pt">09 6939 5328</fo:block>
															</fo:table-cell>
														</fo:table-row>
													</fo:table-body>
												</fo:table>
											</fo:block>
											<fo:block space-after="1pt">kirjaamo@prh.fi</fo:block>
											<fo:block space-after="1pt">www.prh.fi</fo:block>
										</xsl:when>
										<xsl:when test="@ro='XN'">
											<fo:block space-after="1pt">Helgeshøj Allé 81</fo:block>
											<fo:block space-after="5pt">2630 Taastrup</fo:block>
											<fo:block space-after="5pt">Denmark</fo:block>
											<fo:block>
												<fo:table border-color="black">
													<fo:table-column column-width="15mm"/>
													<fo:table-column column-width="20mm"/>
													<fo:table-body>
														<fo:table-row>
															<fo:table-cell>
																<fo:block space-after="1pt">Telephone</fo:block>
																<fo:block space-after="1pt">Fax</fo:block>
															</fo:table-cell>
															<fo:table-cell>
																<fo:block space-after="1pt">+45 43 50 85 00</fo:block>
																<fo:block space-after="1pt">+45 43 50 80 08</fo:block>
															</fo:table-cell>
														</fo:table-row>
													</fo:table-body>
												</fo:table>
											</fo:block>
											<fo:block space-after="1pt">npi@npi.int</fo:block>
											<fo:block space-after="1pt">http://www.npi.int</fo:block>
										</xsl:when>
									</xsl:choose>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
					</fo:table>
					<!-- end of table -->
					<!-- start of table  -->
					<fo:table table-layout="fixed" border-top="0.5pt solid black" border="0.5pt solid black">
						<fo:table-column column-width="92mm"/>
						<fo:table-column column-width="30.6mm"/>
						<fo:table-column column-width="30.6mm"/>
						<fo:table-column column-width="30.mm"/>
						<fo:table-body>
							<fo:table-row>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left">1. Aktenzeichen des Anmelders oder Anwalts</fo:block>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
									<fo:block font-size="11pt" text-align="left">
										<xsl:value-of select="file-reference-id"/>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
							<fo:table-row>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left">2. Internationales Aktenzeichen</fo:block>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
									<fo:block font-size="11pt" text-align="left">
										<xsl:value-of select="doc-number"/>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
							<fo:table-row>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left">3. Datum</fo:block>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
									<fo:block font-size="11pt" text-align="left">
										<xsl:choose>
											<xsl:when test="@ro='EP'">
												<xsl:value-of select="concat(substring(@date-produced,7,2), '-', substring(@date-produced,5,2), '-', substring(@date-produced,1,4))"/>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="concat(substring(@date-produced,7,4), '-', substring(@date-produced,4,2), '-', substring(@date-produced,1,2))"/>
											</xsl:otherwise>
										</xsl:choose>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
							<fo:table-row>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left">4. Zahlungsart</fo:block>
								</fo:table-cell>
								<xsl:choose>
									<xsl:when test="payment-mode='Other'">
										<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
											<fo:block font-size="11pt" text-align="left">
												<xsl:value-of select="concat(payment-mode, ' (', payment-mode/@dtext, ')' )"/>
											</fo:block>
										</fo:table-cell>
									</xsl:when>
									<xsl:when test="@ro='ES'">
										<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
											<fo:block font-size="11pt" text-align="left">
												<xsl:value-of select="'Mit dem Internet von der OEPM Website'"/>
											</fo:block>
										</fo:table-cell>
									</xsl:when>
									<xsl:when test="@ro='EP'">
										<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
											<fo:block font-size="11pt" text-align="left">
												<xsl:choose>
													<xsl:when test="ep-financial-data/mode-of-payment/@mode-type='auto'">
														<xsl:value-of select="'Automatische Abbuchung'"/>
													</xsl:when>
													<xsl:when test="ep-financial-data/mode-of-payment/@mode-type='bank'">
														<xsl:value-of select="'Banküberweisung'"/>
													</xsl:when>
													<xsl:when test="ep-financial-data/mode-of-payment/@mode-type='deposit'">
														<xsl:value-of select="'Abbuchung vom laufenden Konto'"/>
													</xsl:when>
													<xsl:when test="ep-financial-data/mode-of-payment/@mode-type='ccard'">
														<xsl:value-of select="'Kreditkarte'"/>
													</xsl:when>
													<xsl:otherwise>
														<xsl:value-of select="'Nicht angegeben'"/>
													</xsl:otherwise>
												</xsl:choose>
											</fo:block>
										</fo:table-cell>
									</xsl:when>
									<xsl:otherwise>
										<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
											<fo:block font-size="11pt" text-align="left">
												<xsl:value-of select="payment-mode"/>
											</fo:block>
										</fo:table-cell>
									</xsl:otherwise>
								</xsl:choose>
							</fo:table-row>
							<!-- <xsl:if test="@ro='EP' and ep-financial-data/mode-of-payment/@mode-type='bank'">
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Bank konto:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="ep-financial-data/mode-of-payment/@accno"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if> -->
							<xsl:if test="@ro='EP' and ep-financial-data/mode-of-payment/@mode-type='ccard'">
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Bank konto:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="ep-financial-data/mode-of-payment/@accno"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<!--<xsl:if test="@ro='EP' and ep-financial-data/mode-of-payment/@mode-type='auto'">
								<fo:table-row>
									<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="normal" font-size="10pt" text-align="left">
											<xsl:text>The Office in its capacity as receiving Office (RO), as International Searching Authority (ISA), and, where applicable, in its capacity as International Preliminary Examining Authority (IPEA) is authorized to automatically debit, under the terms of the Office's automatic debit procedure, the identified account with any fees due in the processing of this International Application</xsl:text>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="'Ja'"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>-->
							<xsl:if test="(payment-mode='Deposit account') or (payment-mode='NPI deposit account') or (ep-financial-data/mode-of-payment/@mode-type='deposit') or (ep-financial-data/mode-of-payment/@mode-type='auto')">
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Nummer des laufenden Kontos:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:choose>
												<xsl:when test="@ro='EP'">
													<xsl:value-of select="ep-financial-data/mode-of-payment/@accno"/>
												</xsl:when>
												<xsl:otherwise>
													<xsl:value-of select="deposit-account/account-no"/>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Kontoinhaber:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:choose>
												<xsl:when test="@ro='EP'">
													<xsl:value-of select="ep-financial-data/mode-of-payment"/>
												</xsl:when>
												<xsl:otherwise>
													<xsl:value-of select="deposit-account/account-name"/>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="@ro='EP' and ep-financial-data/mode-of-payment/@mode-type='auto'">
								<fo:table-row>
									<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="normal" font-size="10pt" text-align="left">
											<xsl:text>Das Amt in seiner Eigenschaft als Anmeldeamt (RO), als Internationale Recherchenbehörde (ISA) und gegebenenfalls als mit der internationalen vorläufigen Prüfung beauftragte Behörde (IPEA) wird hiermit ermächtigt, die für die Bearbeitung dieser internationalen Anmeldung anfallenden Gebühren, gemäß dem automatischen Abbuchungsverfahren des Amts, vom angegebenen Konto abzubuchen</xsl:text>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="'Ja'"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="(payment-mode='Deposit account') or (payment-mode='NPI deposit account') or (ep-financial-data/mode-of-payment/@mode-type='deposit')">
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">
											<xsl:choose>
												<xsl:when test="@ro='EP'">Das Europäische Patentamt wird hiermit ermächtigt, den Gesamtbetrag der Gebühren vom vorstehend angegebenen laufenden Konto abzubuchen:</xsl:when>
												<xsl:otherwise>Die Ermächtigung zur Gesamt Gebühren:</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:choose>
												<xsl:when test="@ro='EP'">
													<xsl:value-of select="'Ja'"/>
												</xsl:when>
												<xsl:otherwise>
													<xsl:choose>
														<xsl:when test="deposit-account/authorisation/total-fee='true'">
															<xsl:value-of select="'Ja'"/>
														</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="'Nein'"/>
														</xsl:otherwise>
													</xsl:choose>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Ermächtigung, Fehlbeträge oder Überzahlungen des Gesamtbetrages der Gebühren dem laufenden Konto zu belasten bzw. gutzuschreiben:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:choose>
												<xsl:when test="@ro='EP'">
													<xsl:choose>
														<xsl:when test="ep-financial-data/mode-of-payment/@deficiency-credit='true'">
															<xsl:value-of select="'Ja'"/>
														</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="'Nein'"/>
														</xsl:otherwise>
													</xsl:choose>
												</xsl:when>
												<xsl:otherwise>
													<xsl:choose>
														<xsl:when test="deposit-account/authorisation/deficiency-credit='true'">
															<xsl:value-of select="'Ja'"/>
														</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="'Nein'"/>
														</xsl:otherwise>
													</xsl:choose>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="@ro='EP' and ep-financial-data/mode-of-payment/@mode-type='ccard'">
								<fo:table-row>
									<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="normal" font-size="10pt" text-align="left">
											<xsl:text>Die unter Gebührenauswahl angegebenen Gebühren und Auslagen werden per Kreditkarte bezahlt</xsl:text>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="'Ja'"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="@ro='SE' and payment-mode='Deposit account'">
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Unterschrift:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="deposit-account/account-signature"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="@ro='EP' and ep-financial-data/mode-of-payment/@mode-type='deposit' or ep-financial-data/mode-of-payment/@mode-type='auto'">
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Name:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="ep-financial-data/mode-of-payment/@name"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Unterschrift:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="ep-financial-data/mode-of-payment/@account-signature"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="@ro='ES' and payment-mode!='Bank transfer'">
								<fo:table-row>
									<fo:table-cell padding-end.length="4pt" length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Barcode für Gebühren:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="es-barcodes/fee-code"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<!--<fo:table-row>
									<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Der Anmelder ist eine öffentliche Universität:</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="8pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:choose>
												<xsl:when test="es-fee-exemption ='true'">
													<xsl:call-template name="CheckBox">
														<xsl:with-param name="check">
															<xsl:value-of select="'true'"/>
														</xsl:with-param>
													</xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="CheckBox">
														<xsl:with-param name="check">
															<xsl:value-of select="'false'"/>
														</xsl:with-param>
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>-->
							</xsl:if>

							<xsl:if test="@ro='EP' and substring(@date-produced, 1, 8)>='20190401'">
								<fo:table-row>
									<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="left">5. Anweisungen zur Rückerstattung</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell padding-start.length="4pt" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Amt, das die Erstattung bearbeitet: </fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="ep-financial-data/reimbursement-deposit-account/ip-office"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell padding-start.length="4pt" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Etwaige Rückerstattung auf das laufende Konto beim EPA: </fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="ep-financial-data/reimbursement-deposit-account/account-no"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell padding-start.length="4pt" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Kontoinhaber: </fo:block>
									</fo:table-cell>
									<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
										<fo:block font-size="11pt" text-align="left">
											<xsl:value-of select="ep-financial-data/reimbursement-deposit-account/name"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell padding-start.length="4pt" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
										<fo:block font-weight="bold" font-size="11pt" text-align="right">Datum: </fo:block>
									</fo:table-cell>
									<xsl:choose>
										<xsl:when test="ep-financial-data/reimbursement-deposit-account">								
											<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
												<fo:block font-size="11pt" text-align="left">
													<xsl:value-of select="concat(substring(@date-produced,7,2), '-', substring(@date-produced,5,2), '-', substring(@date-produced,1,4))"/>
												</fo:block>
											</fo:table-cell>
										</xsl:when>
										<xsl:otherwise>
											<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border-top="0.5pt solid black" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
												<fo:block font-size="11pt" text-align="left">
												</fo:block>
											</fo:table-cell>
										</xsl:otherwise>
									</xsl:choose>
								</fo:table-row>
							</xsl:if>

							<fo:table-row>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<xsl:choose>
										<xsl:when test="@ro='EP' and substring(@date-produced, 1, 8)>='20190401'">
											<fo:block font-weight="bold" font-size="11pt" text-align="left">6. Gebühren</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block font-weight="bold" font-size="11pt" text-align="left">5. Gebühren</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" number-columns-spanned="3" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt"/>
							</fo:table-row>
							<fo:table-row>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left">Gebührenart</fo:block>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left">
										<xsl:value-of select="'Währung'"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left">
										<xsl:value-of select="'Gebühr'"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left">
										<xsl:value-of select="'Insgesamt'"/>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
							<fo:table-row height="11pt">
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="left"/>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-size="11pt" text-align="left"/>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
									<fo:block font-size="11pt" text-align="left"/>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
									<fo:block font-size="11pt" text-align="left"/>
								</fo:table-cell>
							</fo:table-row>
							<!-- all currency is updated with the two decimal places-->
							<xsl:choose>
								<xsl:when test="@ro='EP'">
									<xsl:choose>
										<xsl:when test="ep-financial-data/mode-of-payment/@mode-type='auto'">
											<fo:table-row>
												<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
													<fo:block font-size="11pt" text-align="left">
														<xsl:value-of select="''"/>
													</fo:block>
												</fo:table-cell>
												<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
													<fo:block font-size="11pt" text-align="left">
														<xsl:value-of select="''"/>
													</fo:block>
												</fo:table-cell>
												<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
													<fo:block font-size="11pt" text-align="right">
														<xsl:value-of select="''"/>
													</fo:block>
												</fo:table-cell>
												<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
													<fo:block font-size="11pt" text-align="right">
														<xsl:value-of select="''"/>
													</fo:block>
												</fo:table-cell>
											</fo:table-row>
										</xsl:when>
										<xsl:otherwise>
											<xsl:for-each select="ep-financial-data/fees/standard-fee/fee">
												<fo:table-row>
													<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
														<fo:block font-size="11pt" text-align="left">
															<xsl:choose>
																<xsl:when test="@index='021'">
																	<xsl:value-of select="'Gebühr für vorläufige Prüfung einer int. Anmeldung'"/>
																</xsl:when>
																<xsl:when test="@index='224'">
																	<xsl:value-of select="'Bearbeitungsgebühr'"/>
																</xsl:when>
															</xsl:choose>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
														<fo:block font-size="11pt" text-align="left">
															<xsl:value-of select="'EUR'"/>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
														<fo:block font-size="11pt" text-align="right">
															<xsl:choose>
																<xsl:when test="fee-schedule!=''">
																	<xsl:value-of select="format-number(fee-schedule,'#0.00')"/>
																</xsl:when>
																<xsl:otherwise>
																	<xsl:value-of select="'0.00'"/>
																</xsl:otherwise>
															</xsl:choose>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
														<fo:block font-size="11pt" text-align="right">
															<xsl:choose>
																<xsl:when test="fee-sub-amount!=''">
																	<xsl:value-of select="format-number(fee-sub-amount,'#0.00')"/>
																</xsl:when>
																<xsl:otherwise>
																	<xsl:value-of select="'0.00'"/>
																</xsl:otherwise>
															</xsl:choose>
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</xsl:for-each>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:when>
								<xsl:otherwise>
									<xsl:for-each select="fees/fee">
										<fo:table-row>
											<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
												<fo:block font-size="11pt" text-align="left">
													<xsl:value-of select="@fee-description"/>
												</fo:block>
											</fo:table-cell>
											<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
												<fo:block font-size="11pt" text-align="left">
													<xsl:choose>
														<xsl:when test="../../@ro='SE'">
															<xsl:value-of select="'SEK'"/>
														</xsl:when>
														<xsl:when test="../../@ro='XN'">
															<xsl:value-of select="'DKK'"/>
														</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="'EUR'"/>
														</xsl:otherwise>
													</xsl:choose>
												</fo:block>
											</fo:table-cell>
											<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt">
												<fo:block font-size="11pt" text-align="right">
													<xsl:choose>
														<xsl:when test="fee-each!=''">
															<xsl:value-of select="format-number(fee-each,'#0.00')"/>
														</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="'0.00'"/>
														</xsl:otherwise>
													</xsl:choose>
												</fo:block>
											</fo:table-cell>
											<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" padding-before.length="2pt" border-right-width="0pt">
												<fo:block font-size="11pt" text-align="right">
													<xsl:choose>
														<xsl:when test="amount-total!=''">
															<xsl:value-of select="format-number(amount-total,'#0.00')"/>
														</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="'0.00'"/>
														</xsl:otherwise>
													</xsl:choose>
												</fo:block>
											</fo:table-cell>
										</fo:table-row>
									</xsl:for-each>
								</xsl:otherwise>
							</xsl:choose>
							<fo:table-row>
								<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" border-bottom-width="0pt" padding-before.length="2pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="right">Total</fo:block>
								</fo:table-cell>
								<fo:table-cell padding-start.length="4pt" border="0.5pt solid black" border-left-width="0pt" border-bottom-width="0pt" padding-before.length="2pt">
									<fo:block font-size="11pt" text-align="left">
										<xsl:choose>
											<xsl:when test="@ro='SE'">
												<xsl:value-of select="'SEK'"/>
											</xsl:when>
											<xsl:when test="@ro='XN'">
												<xsl:value-of select="'DKK'"/>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="'EUR'"/>
											</xsl:otherwise>
										</xsl:choose>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" border-bottom-width="0pt" padding-before.length="2pt">
									<fo:block font-size="11pt" text-align="right"/>
								</fo:table-cell>
								<fo:table-cell padding-end.length="4pt" border="0.5pt solid black" border-left-width="0pt" border-bottom-width="0pt" padding-before.length="2pt" border-right-width="0pt">
									<fo:block font-weight="bold" font-size="11pt" text-align="right">
										<xsl:choose>
											<xsl:when test="@ro='EP'">
												<xsl:choose>
													<xsl:when test="ep-financial-data/mode-of-payment/@mode-type='auto'">
														<xsl:value-of select="''"/>
													</xsl:when>
													<xsl:otherwise>
														<xsl:value-of select="format-number(ep-financial-data/fees/fee-total-amount,'#0.00')"/>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="format-number(amount-grand-total,'#0.00')"/>
											</xsl:otherwise>
										</xsl:choose>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
					</fo:table>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>

	<xsl:template name="CheckBox">
		<xsl:param name="check"/>
		<xsl:choose>
			<xsl:when test="$check='true'">
				<!-- checked -->
				<fo:external-graphic src="box_checked.png" content-height="2.5mm" scaling="uniform"/>
			</xsl:when>
			<xsl:otherwise>
				<!-- not checked -->
				<fo:external-graphic src="box_unchecked.png" content-height="2.5mm" scaling="uniform"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2009. Progress Software Corporation. All rights reserved.

<metaInformation>
	<scenarios/>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
		<MapperBlockPosition></MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->