<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:fo="http://www.w3.org/1999/XSL/Format"
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns:e="http://schemas.gov.sk/form/00002801.formular_ISEE.sk/1.0">
  <xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="utf-8"/>
  <xsl:template name="string-replace-all">
		<xsl:param name="text" />
		<xsl:param name="replace" />
		<xsl:param name="by" />
		<xsl:choose>
			<xsl:when test="contains($text, $replace)">
				<xsl:value-of select="substring-before($text,$replace)" />
				<xsl:value-of select="$by" />
				<xsl:call-template name="string-replace-all">
					<xsl:with-param name="text" select="substring-after($text,$replace)" />
					<xsl:with-param name="replace" select="$replace" />
					<xsl:with-param name="by" select="$by" />
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$text" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
		
	<xsl:template name="FormatText">
		<xsl:param name="data"/>
		
		<xsl:variable name="var1">
		  <xsl:call-template name="formater1">
				<xsl:with-param name="text" select="$data"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var2">
		  <xsl:call-template name="formater2">
				<xsl:with-param name="text" select="$var1"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var3">
		  <xsl:call-template name="formater3">
				<xsl:with-param name="text" select="$var2"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var4">
		  <xsl:call-template name="formater4">
				<xsl:with-param name="text" select="$var3"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var5">
		  <xsl:call-template name="formater5">
				<xsl:with-param name="text" select="$var4"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var6">
		  <xsl:call-template name="formater6">
				<xsl:with-param name="text" select="$var5"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var7">
		  <xsl:call-template name="formater7">
				<xsl:with-param name="text" select="$var6"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var8">
		  <xsl:call-template name="formater8">
				<xsl:with-param name="text" select="$var7"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var9">
		  <xsl:call-template name="formater9">
				<xsl:with-param name="text" select="$var8"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var10">
		  <xsl:call-template name="formater10">
				<xsl:with-param name="text" select="$var9"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var11">
		  <xsl:call-template name="formater11">
				<xsl:with-param name="text" select="$var10"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var12">
		  <xsl:call-template name="formater12">
				<xsl:with-param name="text" select="$var11"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var13">
		  <xsl:call-template name="formater13">
				<xsl:with-param name="text" select="$var12"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var14">
		  <xsl:call-template name="formater14">
				<xsl:with-param name="text" select="$var13"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var15">
		  <xsl:call-template name="formater15">
				<xsl:with-param name="text" select="$var14"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var16">
		  <xsl:call-template name="formater16">
				<xsl:with-param name="text" select="$var15"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var17">
		  <xsl:call-template name="formater17">
				<xsl:with-param name="text" select="$var16"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var18">
		  <xsl:call-template name="formater18">
				<xsl:with-param name="text" select="$var17"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var19">
		  <xsl:call-template name="formater19">
				<xsl:with-param name="text" select="$var18"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var20">
		  <xsl:call-template name="formater20">
				<xsl:with-param name="text" select="$var19"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var21">
		  <xsl:call-template name="formater21">
				<xsl:with-param name="text" select="$var20"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var22">
		  <xsl:call-template name="formater22">
				<xsl:with-param name="text" select="$var21"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var23">
		  <xsl:call-template name="formater23">
				<xsl:with-param name="text" select="$var22"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var24">
		  <xsl:call-template name="formater24">
				<xsl:with-param name="text" select="$var23"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var25">
		  <xsl:call-template name="formater25">
				<xsl:with-param name="text" select="$var24"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var26">
		  <xsl:call-template name="formater26">
				<xsl:with-param name="text" select="$var25"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var27">
		  <xsl:call-template name="formater27">
				<xsl:with-param name="text" select="$var26"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var28">
		  <xsl:call-template name="formater28">
				<xsl:with-param name="text" select="$var27"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var29">
		  <xsl:call-template name="formater29">
				<xsl:with-param name="text" select="$var28"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var30">
		  <xsl:call-template name="formater30">
				<xsl:with-param name="text" select="$var29"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var31">
		  <xsl:call-template name="formater31">
				<xsl:with-param name="text" select="$var30"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var32">
		  <xsl:call-template name="formater32">
				<xsl:with-param name="text" select="$var31"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var33">
		  <xsl:call-template name="formater33">
				<xsl:with-param name="text" select="$var32"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var34">
		  <xsl:call-template name="formater34">
				<xsl:with-param name="text" select="$var33"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var35">
		  <xsl:call-template name="formater35">
				<xsl:with-param name="text" select="$var34"/>
			</xsl:call-template>
		</xsl:variable>
		
		<xsl:variable name="var36">
		  <xsl:call-template name="formater36">
				<xsl:with-param name="text" select="$var35"/>
			</xsl:call-template>
		</xsl:variable>

		<xsl:value-of select="$var36"/>
	</xsl:template>
	
	<xsl:template name="formater1">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' § '" />
			<xsl:with-param name="by"><xsl:text> §&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater2">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' Z.z.'" />
			<xsl:with-param name="by"><xsl:text>&#160;Z.z.</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater3">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' v '" />
			<xsl:with-param name="by"><xsl:text> v&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater4">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' o '" />
			<xsl:with-param name="by"><xsl:text> o&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater5">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' na '" />
			<xsl:with-param name="by"><xsl:text> na&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater6">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' k '" />
			<xsl:with-param name="by"><xsl:text> k&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater7">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' do '" />
			<xsl:with-param name="by"><xsl:text> do&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater8">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' cez '" />
			<xsl:with-param name="by"><xsl:text> cez&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater9">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' bez '" />
			<xsl:with-param name="by"><xsl:text> bez&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater10">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' od '" />
			<xsl:with-param name="by"><xsl:text> od&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater11">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' po '" />
			<xsl:with-param name="by"><xsl:text> po&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater12">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' pod '" />
			<xsl:with-param name="by"><xsl:text> pod&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater13">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' pre '" />
			<xsl:with-param name="by"><xsl:text> pre&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater14">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' pri '" />
			<xsl:with-param name="by"><xsl:text> pri&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater15">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' s '" />
			<xsl:with-param name="by"><xsl:text> s&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater16">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' so '" />
			<xsl:with-param name="by"><xsl:text> so&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater17">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' z '" />
			<xsl:with-param name="by"><xsl:text> z&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater18">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' zo '" />
			<xsl:with-param name="by"><xsl:text> zo&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater19">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' u '" />
			<xsl:with-param name="by"><xsl:text> u&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater20">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' proti '" />
			<xsl:with-param name="by"><xsl:text> proti&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater21">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' pred '" />
			<xsl:with-param name="by"><xsl:text> pred&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater22">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' medzi '" />
			<xsl:with-param name="by"><xsl:text> medzi&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater23">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' okrem '" />
			<xsl:with-param name="by"><xsl:text> okrem&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater24">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' ku '" />
			<xsl:with-param name="by"><xsl:text> ku&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater25">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' voči '" />
			<xsl:with-param name="by"><xsl:text> voči&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater26">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' a '" />
			<xsl:with-param name="by"><xsl:text> a&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater27">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' nad '" />
			<xsl:with-param name="by"><xsl:text> nad&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater28">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' EUR'" />
			<xsl:with-param name="by"><xsl:text>&#160;EUR</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater29">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' za '" />
			<xsl:with-param name="by"><xsl:text> za&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater30">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' č. '" />
			<xsl:with-param name="by"><xsl:text> č.&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater31">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' vo '" />
			<xsl:with-param name="by"><xsl:text> vo&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater32">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' eur'" />
			<xsl:with-param name="by"><xsl:text>&#160;eur</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater33">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' odo '" />
			<xsl:with-param name="by"><xsl:text> odo&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater34">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="'(§ '" />
			<xsl:with-param name="by"><xsl:text>(§&#160;</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater35">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' %'" />
			<xsl:with-param name="by"><xsl:text>&#160;%</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="formater36">
		<xsl:param name="text"/>
		<xsl:call-template name="string-replace-all">
			<xsl:with-param name="text" select="$text"/>
			<xsl:with-param name="replace" select="' Z. z.'" />
			<xsl:with-param name="by"><xsl:text>&#160;Z.&#160;z.</xsl:text></xsl:with-param>
		</xsl:call-template>
	</xsl:template>
  <xsl:template match="e:b" mode="SpecialTextFormatting">
	<fo:inline font-weight="bold"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:i" mode="SpecialTextFormatting">
	<fo:inline font-style="italic"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:u" mode="SpecialTextFormatting">
	<fo:inline text-decoration="underline"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:strong" mode="SpecialTextFormatting">
	<fo:inline font-weight="bold"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:em" mode="SpecialTextFormatting">
	<fo:inline font-style="italic"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:ins" mode="SpecialTextFormatting">
	<fo:inline text-decoration="underline"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:q" mode="SpecialTextFormatting">
	<xsl:text>"</xsl:text><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/><xsl:text>"</xsl:text>
</xsl:template>
<xsl:template match="e:big" mode="SpecialTextFormatting">
  <xsl:call-template name="FormatText"><xsl:with-param name="data" select="translate(., 'aáäbcčdďeéfghiíjklĺľmnňoóôpqrŕsštťuúvwxyýzž', 'AÁÄBCČDĎEÉFGHIÍJKLĹĽMNŇOÓÔPQRŔSŠTŤUÚVWXYÝZŽ')"/></xsl:call-template>
</xsl:template>
<xsl:template match="e:small" mode="SpecialTextFormatting">
  <xsl:call-template name="FormatText"><xsl:with-param name="data" select="translate(., 'AÁÄBCČDĎEÉFGHIÍJKLĹĽMNŇOÓÔPQRŔSŠTŤUÚVWXYÝZŽ', 'aáäbcčdďeéfghiíjklĺľmnňoóôpqrŕsštťuúvwxyýzž')"/></xsl:call-template>
</xsl:template>
<xsl:template match="e:br" mode="SpecialTextFormatting">
  <xsl:text>&#xa0;</xsl:text><fo:block/>
</xsl:template>
<xsl:template match="e:p" mode="SpecialTextFormatting">
  <fo:block><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:block>
</xsl:template>
<xsl:template match="e:p[contains(@style, 'text-align:')] | e:p[contains(@style, 'margin-left:')]" mode="SpecialTextFormatting">
  <fo:block>
    <xsl:if test="contains(@style, 'text-align:')">
      <xsl:attribute name="text-align">
        <xsl:value-of select="substring-before(substring-after(@style, 'text-align:'), ';')"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:if test="contains(@style, 'margin-left:')">
      <xsl:attribute name="text-indent">
        <xsl:value-of select="concat(substring-before(substring-after(@style, 'margin-left:'), 'px'), 'px')"/>
      </xsl:attribute>
    </xsl:if>
    <xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/>
  </fo:block>
</xsl:template>
<xsl:template match="e:bullet" mode="SpecialTextFormatting">
  <fo:table table-layout="fixed" width="100%">
    <fo:table-column column-width="10pt"/>
    <fo:table-column/>
    <fo:table-body>
      <fo:table-row>
        <fo:table-cell>
          <fo:block><xsl:text>&#8226;</xsl:text></fo:block>
        </fo:table-cell>
        <fo:table-cell>
          <fo:block><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:block>
        </fo:table-cell>
      </fo:table-row>
    </fo:table-body>
  </fo:table>
</xsl:template>
<xsl:template match="e:indexH" mode="SpecialTextFormatting">
  <fo:inline vertical-align="super" font-size="6pt"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:indexD" mode="SpecialTextFormatting">
  <fo:inline vertical-align="sub" font-size="6pt"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:sup" mode="SpecialTextFormatting">
  <fo:inline vertical-align="super" font-size="6pt"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:sub" mode="SpecialTextFormatting">
  <fo:inline vertical-align="sub" font-size="6pt"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:tab" mode="SpecialTextFormatting">
  <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
</xsl:template>
<xsl:template match="e:tabTextIndent" mode="SpecialTextFormatting">
  <fo:block text-indent="10px" margin-bottom="-10px">
		<xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/>
	</fo:block>
</xsl:template>
<xsl:template match="e:nbsp" mode="SpecialTextFormatting">
  <xsl:text>&#xa0;</xsl:text>
</xsl:template>
<xsl:template match="e:indent" mode="SpecialTextFormatting">
		<fo:block text-indent="0.5cm"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:block>
</xsl:template>
<xsl:template match="e:center" mode="SpecialTextFormatting">
		<fo:block text-align="center"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:block>
</xsl:template>
<xsl:template match="e:ul" mode="SpecialTextFormatting">
  <fo:list-block><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:list-block>
</xsl:template>
<xsl:template match="e:li" mode="SpecialTextFormatting">
  <fo:list-item>
    <fo:list-item-label start-indent="10px">
      <fo:block>&#9679;</fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="20px">
      <fo:block><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:block>
    </fo:list-item-body>
  </fo:list-item>
</xsl:template>
<xsl:template match="e:span[contains(@style, 'letter-spacing:')]" mode="SpecialTextFormatting">
  <fo:inline letter-spacing="{concat(substring-before(substring-after(@style, 'letter-spacing:'), 'px'), 'px')}">
    <xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/>
  </fo:inline>
</xsl:template>
<xsl:template match="e:span[contains(@padding-left, 'px')]" mode="SpecialTextFormatting">
  <fo:inline padding-left="{@padding-left}"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:span[contains(@padding-right, 'px')]" mode="SpecialTextFormatting">
  <fo:inline padding-right="{@padding-right}"><xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/></fo:inline>
</xsl:template>
<xsl:template match="e:h3" mode="SpecialTextFormatting">
		<fo:block font-size="11pt">
		  <xsl:if test="@align != ''"><xsl:attribute name="text-align"><xsl:value-of select="@align"/></xsl:attribute></xsl:if>
		  <xsl:apply-templates mode="SpecialTextFormatting" select="*|text()"/>
		</fo:block>
</xsl:template>
<xsl:template match="e:a[@href]" mode="SpecialTextFormatting">
	<fo:basic-link external-destination="url('{@href}')" color="blue" text-decoration="underline"><xsl:value-of select="."/></fo:basic-link>
</xsl:template>
<xsl:template match="text()" mode="SpecialTextFormatting">
  <xsl:call-template name="FormatText"><xsl:with-param name="data" select="."/></xsl:call-template>
</xsl:template>
  <!-- GENERATED -->
  <xsl:template match="/">
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="'Arial', sans-serif" font-size="9.0pt" color="black">
    <fo:layout-master-set>
      <!--Vertical page layout-->
  	  <fo:simple-page-master master-name="firstPageVertical" page-height="297mm" page-width="210mm">
  		  <fo:region-body margin-top="2.0cm" margin-bottom="2.0cm" margin-left="1.8cm" margin-right="1.8cm" />
  		  <fo:region-before region-name="xsl-region-before" extent="12.5cm"/>
  		  <fo:region-after region-name="xsl-region-after-first-page" extent="12.5cm" display-align="after"/>
  	  </fo:simple-page-master>
  	  
  	  <fo:simple-page-master master-name="restPagesVertical" page-height="297mm" page-width="210mm">
  		  <fo:region-body margin-top="2.0cm" margin-bottom="2.0cm" margin-left="1.8cm" margin-right="1.8cm" />
  		  <fo:region-after region-name="xsl-region-after-rest-pages" extent="5in" display-align="after"/>
  	  </fo:simple-page-master>
  	  
  	  <fo:page-sequence-master master-name="A4Vertical">
  		  <fo:repeatable-page-master-alternatives>
  			  <fo:conditional-page-master-reference page-position="first" master-reference="firstPageVertical"/>
  			  <fo:conditional-page-master-reference master-reference="restPagesVertical"/>
  		  </fo:repeatable-page-master-alternatives>
  	  </fo:page-sequence-master>
  	  
  	  <!--Horizontal page layout-->
  	  <fo:simple-page-master master-name="firstPageHorizontal" page-height="210mm" page-width="297mm">
  		  <fo:region-body margin-top="2.0cm" margin-bottom="2.0cm" margin-left="1.8cm" margin-right="1.8cm" />
  		  <fo:region-before region-name="xsl-region-before" extent="12.5cm"/>
  		  <fo:region-after region-name="xsl-region-after-first-page" extent="12.5cm" display-align="after"/>
  	  </fo:simple-page-master>
  	  
  	  <fo:simple-page-master master-name="restPagesHorizontal" page-height="210mm" page-width="297mm">
  		  <fo:region-body margin-top="2.0cm" margin-bottom="2.0cm" margin-left="1.8cm" margin-right="1.8cm" />
  		  <fo:region-after region-name="xsl-region-after-rest-pages" extent="5in" display-align="after"/>
  	  </fo:simple-page-master>
  	  
			<fo:page-sequence-master master-name="A4Horizontal">
				<fo:repeatable-page-master-alternatives>
					<fo:conditional-page-master-reference page-position="first" master-reference="firstPageHorizontal"/>
					<fo:conditional-page-master-reference master-reference="restPagesHorizontal"/>
				</fo:repeatable-page-master-alternatives>
			</fo:page-sequence-master>
    </fo:layout-master-set>
        
    <fo:page-sequence master-reference="A4Vertical">
      <fo:static-content flow-name="xsl-region-before" margin-left="2mm" margin-right="2mm">
  <!--foBlockForTableStart-->
  
    <fo:block-container width="auto">
        
          <fo:block    start-indent="0" end-indent="0">
            
            
              <fo:table table-layout="fixed" width="100%">
  <fo:table-column column-width='16.66667%'/>
<fo:table-column column-width='66.66667%'/>
<fo:table-column column-width='16.66667%'/>
  <fo:table-body>
    <fo:table-row>
      <fo:table-cell margin-left="0" >
        <fo:block-container margin-right="1.5mm"  start-indent="0%">
  <fo:table table-layout="fixed" width="100%" start-indent="0" end-indent="0">
    <fo:table-column column-width="100%"/><fo:table-body><fo:table-row>
      <fo:table-cell>
        <xsl:attribute name='padding-left'>2mm</xsl:attribute>
<xsl:attribute name='padding-right'>2mm</xsl:attribute>
        <fo:block margin-top='12.5pt'>
          <fo:external-graphic src="url('data:image/png;base64,{/e:eform[not(@*)]/e:BannerHoreVlavo[not(@*)]}')" content-width="scale-down-to-fit" width="100%"  />
        </fo:block>
      </fo:table-cell>
    </fo:table-row></fo:table-body>
  </fo:table>
</fo:block-container></fo:table-cell><fo:table-cell margin-left="0"><fo:block-container >
  <xsl:attribute name='margin-top'>3mm</xsl:attribute>
<xsl:attribute name='margin-bottom'>3mm</xsl:attribute>
<!--<xsl:attribute name='margin-right'>3mm</xsl:attribute>-->
  
  <fo:table table-layout="fixed" width="100%" start-indent="0" end-indent="0">
    <fo:table-column column-width="100%"/><fo:table-body><fo:table-row>
      <fo:table-cell>
        <xsl:attribute name='padding-left'>2mm</xsl:attribute>
<xsl:attribute name='padding-right'>2mm</xsl:attribute>
        <fo:block
          start-indent="0"
          font-size="9.0pt"
          text-decoration="none"
          font-style="normal"
          font-weight="normal"
          
          ><fo:block><xsl:call-template name="FormatText"><xsl:with-param name="data">&#xa0;</xsl:with-param></xsl:call-template><fo:block/></fo:block><fo:block><fo:leader/></fo:block><fo:block><xsl:call-template name="FormatText"><xsl:with-param name="data">&#xa0;</xsl:with-param></xsl:call-template><fo:block/></fo:block></fo:block>
      </fo:table-cell>
    </fo:table-row></fo:table-body>
  </fo:table>
</fo:block-container></fo:table-cell><fo:table-cell margin-left="0"><fo:block-container margin-right="1.5mm"  start-indent="0%">
  <fo:table table-layout="fixed" width="100%" start-indent="0" end-indent="0">
    <fo:table-column column-width="100%"/><fo:table-body><fo:table-row>
      <fo:table-cell>
        <xsl:attribute name='padding-left'>2mm</xsl:attribute>
<xsl:attribute name='padding-right'>2mm</xsl:attribute>
        <fo:block margin-top='12.5pt'>
          <fo:external-graphic src="url('data:image/png;base64,{/e:eform[not(@*)]/e:BannerHoreVpravo[not(@*)]}')" content-width="scale-down-to-fit" width="100%"  />
        </fo:block>
      </fo:table-cell>
    </fo:table-row></fo:table-body>
  </fo:table>
</fo:block-container>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-body>
</fo:table>
            
          </fo:block>
        
    </fo:block-container>
  
<!--foBlockForTableEnd-->
</fo:static-content>
      <fo:static-content flow-name="xsl-region-after-first-page" margin-left="2mm" margin-right="2mm">
  <fo:block text-align="center" margin-bottom="1cm">Strana <fo:page-number/> / <fo:page-number-citation ref-id="end"/></fo:block>
</fo:static-content>
      <fo:static-content flow-name="xsl-region-after-rest-pages" margin-left="2mm" margin-right="2mm">
  <fo:block text-align="center" margin-bottom="1cm">Strana <fo:page-number/> / <fo:page-number-citation ref-id="end"/></fo:block>
</fo:static-content>
      
      <!-- *******************MAIN BODY********************* -->
      <fo:flow flow-name="xsl-region-body" >
        <fo:block-container width="auto">
  <xsl:attribute name='margin-top'>3mm</xsl:attribute>
<xsl:attribute name='margin-bottom'>3mm</xsl:attribute>
<!--<xsl:attribute name='margin-right'>3mm</xsl:attribute>-->
  
  <fo:table table-layout="fixed" width="100%" start-indent="0" end-indent="0">
    <fo:table-column column-width="100%"/><fo:table-body><fo:table-row>
      <fo:table-cell>
        <xsl:attribute name='padding-left'>2mm</xsl:attribute>
<xsl:attribute name='padding-right'>2mm</xsl:attribute>
        <fo:block
          start-indent="0"
          font-size="9.0pt"
          text-decoration="none"
          font-style="normal"
          font-weight="normal"
          
          ><fo:block><xsl:apply-templates mode="SpecialTextFormatting" select="/e:eform/e:TextSpravy[not(@*)]"/></fo:block></fo:block>
      </fo:table-cell>
    </fo:table-row></fo:table-body>
  </fo:table>
</fo:block-container>
        <fo:block id="end"/>
      </fo:flow>
    </fo:page-sequence>
  </fo:root>
</xsl:template>
</xsl:stylesheet>