<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xml:lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:d="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:exsl="http://exslt.org/common" xmlns:egonp="http://schemas.gov.sk/form/00315737.A0000410.000000281.VYST_archiv_410331_Rozhodnutie_Univerzalne/1.2" exclude-result-prefixes="d" version="1.0">
    <xsl:output method="xml" encoding="UTF-8" indent="no"/>
    <xsl:template match="/">
        <fo:root>
            <fo:layout-master-set>
                <fo:simple-page-master master-name="A4" page-height="842px" page-width="595px" margin-top="20px" margin-bottom="10px" margin-left="15mm" margin-right="10mm">
                    <fo:region-body margin-bottom="20mm" />
                    <fo:region-after region-name="footer" extent="10mm" />
                </fo:simple-page-master>
                <fo:simple-page-master master-name="A4last" page-height="842px" page-width="595px" margin-top="20px" margin-bottom="10px" margin-left="15mm" margin-right="10mm">
                    <fo:region-body margin-bottom="20mm" />
                    <fo:region-after region-name="footer2" extent="20mm" />
                </fo:simple-page-master>
                <fo:page-sequence-master master-name="document">
                    <fo:repeatable-page-master-alternatives>
                        <fo:conditional-page-master-reference page-position="first" master-reference="A4" />
                        <fo:conditional-page-master-reference page-position="rest" master-reference="A4" />
                        <fo:conditional-page-master-reference page-position="only" master-reference="A4last" />
                        <fo:conditional-page-master-reference page-position="last" master-reference="A4last" />
                    </fo:repeatable-page-master-alternatives>
                </fo:page-sequence-master>
            </fo:layout-master-set>
            <fo:page-sequence master-reference="document" font-family="Times New Roman" font-size="10px" text-align="justify">
                <fo:static-content flow-name="footer">
                    <fo:block text-align="end">
                        <fo:page-number />
                        /
                        <fo:page-number-citation ref-id="TheVeryLastPage" />
                    </fo:block>
                </fo:static-content>
                <fo:static-content flow-name="footer2">
                    <xsl:call-template name="FooterTemplate" />
                    <fo:block text-align="end">
                        <fo:page-number />
                        /
                        <fo:page-number-citation ref-id="TheVeryLastPage" />
                    </fo:block>
                </fo:static-content>
                <fo:flow flow-name="xsl-region-body">
                    <xsl:apply-templates />
                    <fo:block id="TheVeryLastPage" />
                </fo:flow>
            </fo:page-sequence>
        </fo:root>
    </xsl:template>
    <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="getMesto">
        <xsl:param name="text" />
        <xsl:param name="separator" />
        <xsl:choose>
            <xsl:when test="contains($text, $separator)">
                <xsl:value-of select="substring-before($text,$separator)" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$text" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="getPredSeparatorom">
        <xsl:param name="text" />
        <xsl:param name="separator" />
        <xsl:choose>
            <xsl:when test="contains($text, $separator)">
                <xsl:value-of select="substring-before($text,$separator)" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="&apos;&apos;" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="UpperCaseUTF8SVK">
        <xsl:param name="text" />
        <xsl:variable name="smallcase" select="&apos;abcdefghijklmnopqrstuvwxyzáäéěíĺóôŕúůýčďľňřšťž&apos;" />
        <xsl:variable name="uppercase" select="&apos;ABCDEFGHIJKLMNOPQRSTUVWXYZÁÄÉĚÍĹÓÔŔÚŮÝČĎĽŇŘŠŤŽ&apos;" />
        <xsl:value-of select="translate($text, $smallcase, $uppercase)" />
    </xsl:template>
    <xsl:decimal-format name="euro" decimal-separator="," grouping-separator=" " />
    <xsl:template name="urobFormatovaneCislo">
        <xsl:param name="hodnota" />
        <xsl:choose>
            <xsl:when test="contains($hodnota, &apos; &apos;)">
                <xsl:value-of select="$hodnota" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="format-number(translate($hodnota, ',', '.'), '### ##0,00', 'euro')" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="getMsU">
        <xsl:param name="text" />
        <xsl:param name="separator" />
        <xsl:choose>
            <xsl:when test="contains($text, $separator)">
                <xsl:value-of select="substring-after($text,$separator)" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$text" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="formatTimeTrimSeconds">
        <xsl:param name="time" />
        <xsl:variable name="timeString" select="string($time)" />
        <xsl:if test="$timeString != ''">
            <xsl:value-of select="substring($timeString, 1, 5)" />
        </xsl:if>
    </xsl:template>
    <xsl:template name="formatTime">
        <xsl:param name="time" />
        <xsl:variable name="timeString" select="string($time)" />
        <xsl:if test="$timeString != ''">
            <xsl:value-of select="substring($timeString, 1, 8)" />
        </xsl:if>
    </xsl:template>
    <xsl:template name="formatToSkDate">
        <xsl:param name="date" />
        <xsl:variable name="dateString" select="string($date)" />
        <xsl:choose>
            <xsl:when test="$dateString != '' and string-length($dateString)=10 and string(number(substring($dateString, 1, 4))) != 'NaN' ">
                <xsl:value-of select="concat(substring($dateString, 9, 2), '.', substring($dateString, 6, 2), '.', substring($dateString, 1, 4))" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$dateString"></xsl:value-of>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="formatToSkDateTime">
        <xsl:param name="dateTime" />
        <xsl:variable name="dateTimeString" select="string($dateTime)" />
        <xsl:choose>
            <xsl:when test="$dateTimeString!= '' and string-length($dateTimeString)>18 and string(number(substring($dateTimeString, 1, 4))) != 'NaN' ">
                <xsl:value-of select="concat(substring($dateTimeString, 9, 2), '.', substring($dateTimeString, 6, 2), '.', substring($dateTimeString, 1, 4),' ', substring($dateTimeString, 12, 2),':', substring($dateTimeString, 15, 2))" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$dateTimeString"></xsl:value-of>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="formatToSkDateTimeSecond">
        <xsl:param name="dateTime" />
        <xsl:variable name="dateTimeString" select="string($dateTime)" />
        <xsl:choose>
            <xsl:when test="$dateTimeString!= '' and string-length($dateTimeString)>18 and string(number(substring($dateTimeString, 1, 4))) != 'NaN' ">
                <xsl:value-of select="concat(substring($dateTimeString, 9, 2), '.', substring($dateTimeString, 6, 2), '.', substring($dateTimeString, 1, 4),' ', substring($dateTimeString, 12, 2),':', substring($dateTimeString, 15, 2),':', substring($dateTimeString, 18, 2))" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$dateTimeString"></xsl:value-of>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226">
        <fo:table>
            <fo:table-column />
            <fo:table-body>
                <fo:table-row>
                    <fo:table-cell>
                        <xsl:apply-templates select="./egonp:Obec" />
                        <xsl:apply-templates select="./egonp:RozhodnutieHlavicka" />
                        <xsl:apply-templates select="./egonp:Adresat" />
                        <xsl:apply-templates select="./egonp:Rozhodnutie" />
                        <xsl:apply-templates select="./egonp:Vyrok" />
                        <xsl:apply-templates select="./egonp:Vyrubuje" />
                        <xsl:apply-templates select="./egonp:DanovnikPopis" />
                        <xsl:apply-templates select="./egonp:Obdobie" />
                        <xsl:apply-templates select="./egonp:DzN" />
                        <xsl:apply-templates select="./egonp:PaymentData" />
                        <xsl:apply-templates select="./egonp:Povinnost" />
                        <xsl:apply-templates select="./egonp:Odovodnenie" />
                        <xsl:apply-templates select="./egonp:Poucenie" />
                        <xsl:apply-templates select="./egonp:Podpis" />
                        <xsl:apply-templates select="./egonp:DorucujeSa" />
                        <xsl:apply-templates select="./egonp:SekciaZakonEGovInfo" />
                    </fo:table-cell>
                </fo:table-row>
            </fo:table-body>
        </fo:table>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Obec">
        <fo:block border-width="0.3pt" margin-left="1pt" margin-top="1pt" margin-right="1pt">
            <fo:block margin-bottom="10pt" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black">
                <fo:table>
                    <fo:table-column />
                    <fo:table-column />
                    <fo:table-column />
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell width="100">
                                <fo:block margin-top="1mm" margin-right="1mm" margin-left="1mm">
                                    <fo:table>
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row>
                                                <fo:table-cell>
                                                    <fo:block margin-top="0pt"></fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell width="340">
                                <fo:block margin-top="1mm" margin-right="3mm" margin-bottom="3mm">
                                    <fo:table>
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row>
                                                <fo:table-cell width="340">
                                                    <fo:block font-weight="bold" text-align="center" font-size="14px">
                                                        <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_MsU">
                                                            <xsl:variable name="resultMesto">
                                                                <xsl:call-template name="getMesto">
                                                                    <xsl:with-param name="text" select="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_MsU" />
                                                                    <xsl:with-param name="separator" select="':'" />
                                                                </xsl:call-template>
                                                            </xsl:variable>
                                                            <xsl:call-template name="UpperCaseUTF8SVK">
                                                                <xsl:with-param name="text" select="$resultMesto" />
                                                            </xsl:call-template>
                                                        </xsl:if>
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                            <fo:table-row>
                                                <fo:table-cell width="340">
                                                    <fo:block text-align="center">
                                                        <xsl:call-template name="getMsU">
                                                            <xsl:with-param name="text" select="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_MsU" />
                                                            <xsl:with-param name="separator" select="':'" />
                                                        </xsl:call-template>
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                            <fo:table-row>
                                                <fo:table-cell width="340">
                                                    <fo:block text-align="center">
                                                        <xsl:value-of select="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_Titulok" />
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block margin-right="1mm" margin-top="2mm" />
                                <fo:block margin-right="3mm" margin-top="2mm" />
                                <fo:block margin-right="3mm" margin-top="2mm" />
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:RozhodnutieHlavicka">
        <fo:block>
            <fo:table margin-top="10px">
                <fo:table-column column-width="19%" />
                <fo:table-column column-width="54%" />
                <fo:table-column column-width="9%" />
                <fo:table-column />
                <fo:table-body>
                    <fo:table-row>
                        <fo:table-cell>
                            <fo:block font-weight="bold">
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_SpravcaDane_iss_gatl1) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_gatl1_text" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:value-of select="./egonp:RozhodnutieHlavicka_SpravcaDane_iss_gatl1" />
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block font-weight="bold" text-indent="6mm">
                                <xsl:call-template name="getFirst">
                                    <xsl:with-param name="text" select="./egonp:RozhodnutieHlavicka_VMeste_iss_ce_rok_gatl4" />
                                    <xsl:with-param name="separator" select="' '" />
                                </xsl:call-template>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:call-template name="getLast">
                                    <xsl:with-param name="text" select="./egonp:RozhodnutieHlavicka_VMeste_iss_ce_rok_gatl4" />
                                    <xsl:with-param name="separator" select="' '" />
                                </xsl:call-template>
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                    <fo:table-row>
                        <fo:table-cell>
                            <fo:block font-weight="bold">
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_CisloKonania_iss_c_kon_pi) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_c_kon_pi_text" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_CisloKonania_iss_c_kon_pi) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_CisloKonania_iss_c_kon_pi" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block font-weight="bold" text-indent="6mm">
                                <xsl:call-template name="getFirst">
                                    <xsl:with-param name="text" select="./egonp:RozhodnutieHlavicka_Datum_iss_gatl5" />
                                    <xsl:with-param name="separator" select="' '" />
                                </xsl:call-template>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:call-template name="getLast">
                                    <xsl:with-param name="text" select="./egonp:RozhodnutieHlavicka_Datum_iss_gatl5" />
                                    <xsl:with-param name="separator" select="' '" />
                                </xsl:call-template>
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                    <fo:table-row>
                        <fo:table-cell>
                            <fo:block font-weight="bold">
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_Vybavuje_iss_gatl2_tl_vybavuje) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_gatl2_text" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_Vybavuje_iss_gatl2_tl_vybavuje) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_Vybavuje_iss_gatl2_tl_vybavuje" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block />
                        </fo:table-cell>
                    </fo:table-row>
                    <fo:table-row>
                        <fo:table-cell>
                            <fo:block font-weight="bold">
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_Telefon_iss_gatl3_tl_telefon) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_gatl3_text" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_Telefon_iss_gatl3_tl_telefon) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_Telefon_iss_gatl3_tl_telefon" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block />
                        </fo:table-cell>
                    </fo:table-row>
                    <fo:table-row>
                        <fo:table-cell>
                            <fo:block font-weight="bold">
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_email) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_email_text" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:if test="string-length(./egonp:RozhodnutieHlavicka_email) > 0">
                                    <xsl:value-of select="./egonp:RozhodnutieHlavicka_email" />
                                </xsl:if>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block />
                        </fo:table-cell>
                    </fo:table-row>
                </fo:table-body>
            </fo:table>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Adresat">
        <fo:table margin-top="10px">
            <fo:table-column column-width="19%" />
            <fo:table-column />
            <fo:table-body>
                <fo:table-row>
                    <fo:table-cell>
                        <fo:block font-weight="bold">
                            <xsl:value-of select="./egonp:Adresat_Riadok1" />
                        </fo:block>
                    </fo:table-cell>
                    <fo:table-cell>
                        <fo:block>
                            <xsl:value-of select="./egonp:Adresat_Danovnik_iss_mpf" />
                        </fo:block>
                    </fo:table-cell>
                </fo:table-row>
                <fo:table-row>
                    <fo:table-cell>
                        <fo:block font-weight="bold">
                            <xsl:value-of select="./egonp:Adresat_Riadok2" />
                        </fo:block>
                    </fo:table-cell>
                    <fo:table-cell>
                        <fo:block>
                            <xsl:call-template name="string-replace-all">
                                <xsl:with-param name="text" select="./egonp:Adresat_Adresa_iss_adr" />
                                <xsl:with-param name="replace" select="'&#10;'" />
                                <xsl:with-param name="by" select="', '" />
                            </xsl:call-template>
                        </fo:block>
                    </fo:table-cell>
                </fo:table-row>
            </fo:table-body>
        </fo:table>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Rozhodnutie">
        <fo:block border-width="0.3pt" margin-left="1pt" margin-right="1pt" margin-top="15pt" margin-bottom="1pt">
            <fo:block margin-bottom="1pt">
                <fo:table margin-bottom="1pt" width="100%">
                    <fo:table-column />
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell margin-top="1pt" margin-bottom="1pt">
                                <fo:block margin-top="1mm" margin-right="3mm" margin-bottom="1pt">
                                    <fo:table margin-bottom="1pt">
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row margin-bottom="1pt">
                                                <fo:table-cell text-align="center" margin-bottom="1pt" font-size="13px">
                                                    <fo:block font-weight="bold" margin-top="1pt" margin-bottom="1pt">
                                                        <xsl:value-of select="./egonp:Rozhodnutie_Text" />
                                                        <xsl:text></xsl:text>
                                                        <xsl:value-of select="./egonp:Rozhodnutie_Text_iss_ce_rok" />
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Vyrok">
        <fo:block margin-left="1pt" margin-top="6pt" margin-right="1pt" margin-bottom="6pt">
            <fo:block hyphenate="true" text-indent="1cm" text-align="justify">
                <xsl:value-of select="./egonp:Vyrok_Text01_iss" />
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Vyrubuje">
        <fo:block text-align="center" font-weight="bold">
            <xsl:value-of select="./egonp:Vyrubuje_Text" />
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DanovnikPopis">
        <fo:block margin-left="1pt" margin-top="6pt" margin-right="1pt">
            <fo:block margin-bottom="6pt">
                <fo:block>
                    <xsl:value-of select="../egonp:Danovnik/egonp:Danovnik_Text" />
                </fo:block>
                <fo:table>
                    <fo:table-column column-width="35%" />
                    <fo:table-column />
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block font-weight="bold">
                                    <xsl:value-of select="./egonp:DanovnikPopis_Riadok1" />
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                    <xsl:value-of select="./egonp:DanovnikPopis_Meno_iss_mpf" />
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block font-weight="bold">
                                    <xsl:value-of select="./egonp:DanovnikPopis_Riadok2" />
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                    <xsl:value-of select="./egonp:DanovnikPopis_Adresa_iss_adr_tp" />
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block font-weight="bold">
                                    <xsl:value-of select="./egonp:DanovnikPopis_Riadok3" />
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                    <xsl:value-of select="./egonp:DanovnikPopis_ICORC_iss_ico_rc_d_nar" />
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:DanovnikPopis/egonp:Danovnik_I_O/text()">
                            <fo:table-row>
                                <fo:table-cell>
                                    <fo:block font-weight="bold">
                                        <xsl:value-of select="./egonp:DanovnikPopis_Riadok4" />
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block>
                                        <xsl:value-of select="./egonp:Danovnik_I_O" />
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </xsl:if>
                    </fo:table-body>
                </fo:table>
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Obdobie">
        <fo:block margin-left="1pt" margin-top="6pt" margin-right="1pt" font-weight="bold" text-align="center">
            <xsl:value-of select="./egonp:Obdobie_Rok_iss_rok" />
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN">
        <fo:block margin-left="1pt" margin-top="6pt" margin-right="1pt">
            <fo:block>
                <fo:block margin-left="1pt" margin-top="3pt" margin-right="3pt" padding-left="1pt" padding-top="2pt" font-weight="bold" font-size="12pt">
                    A. Daň z nehnuteľností v sume:
                    <xsl:value-of select="../egonp:Obdobie/egonp:Obdobie_VSume_iss_tl_sumdzn_symb_mena" />
                </fo:block>
                <fo:block>
                    <xsl:apply-templates select="./egonp:DzN_Pozemky" />
                    <xsl:apply-templates select="./egonp:DzN_Stavby" />
                    <xsl:apply-templates select="./egonp:DzN_Byty" />
                    <fo:block margin-top="3mm" margin-right="3mm">
                        <fo:table>
                            <fo:table-column />
                            <fo:table-body>
                                <fo:table-row>
                                    <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt">
                                        <fo:block>
                                            <xsl:value-of select="./egonp:DzN_DanLehota_iss_frx_dzn" />
                                        </fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                            </fo:table-body>
                        </fo:table>
                    </fo:block>
                    <xsl:apply-templates select="./egonp:DzN_Suma" />
                    <fo:block hyphenate="true" text-align="justify">
                        <xsl:value-of select="./egonp:DzN_Ucet_iss_gatl43_gatl16_gatl18_gatl20_vs_dzn_ssy_dzn" />
                    </fo:block>
                </fo:block>
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky">
        <fo:block margin-left="1pt" margin-right="1pt">
            <fo:block margin-bottom="6pt">
                <fo:block margin-left="3pt" margin-top="3pt" margin-right="3pt" padding-left="1pt" padding-top="2pt" font-weight="bold">I. Daň z pozemkov
                </fo:block>
                <fo:table border-style="solid">
                    <fo:table-column column-width="250pt" />
                    <fo:table-column />
                    <fo:table-column />
                    <fo:table-column column-width="66.4pt" />
                    <fo:table-column column-width="99.6pt" />
                    <fo:table-body>
                        <fo:table-row text-align="center" font-weight="bold">
                            <fo:table-cell border-style="solid" number-rows-spanned="2" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:value-of select="./egonp:DzN_Pozemky_PredmetDane" />
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" number-columns-spanned="2" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:value-of select="./egonp:DzN_Pozemky_ZakladDaneNadpis" />
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" number-rows-spanned="2" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Pozemky_SadzbaDane" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" number-rows-spanned="2" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Pozemky_DanPomernaCast" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row text-align="center" font-weight="bold">
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Pozemky_ZakladDaneVymera" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Pozemky_ZakladDaneHodnota" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <xsl:apply-templates select="./egonp:DzN_Pozemky_A" />
                        <xsl:apply-templates select="./egonp:DzN_Pozemky_B" />
                        <xsl:apply-templates select="./egonp:DzN_Pozemky_C" />
                        <xsl:apply-templates select="./egonp:DzN_Pozemky_D" />
                        <xsl:apply-templates select="./egonp:DzN_Pozemky_E" />
                        <xsl:apply-templates select="./egonp:DzN_Pozemky_F" />
                        <xsl:apply-templates select="./egonp:DzN_Pozemky_G" />
                        <xsl:apply-templates select="./egonp:DzN_Pozemky_H" />
                        <fo:table-row>
                            <fo:table-cell border-style="solid" number-columns-spanned="5">
                                <fo:table table-layout="fixed" width="100%">
                                    <fo:table-column column-width="50%" />
                                    <fo:table-column column-width="50%" />
                                    <fo:table-body>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block text-align="left" font-weight="bold">
                                                    <xsl:value-of select="./egonp:DzN_Pozemky_Spolu" />
                                                </fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block text-align="right" font-weight="bold">
                                                    <xsl:value-of select="./egonp:DzN_Pozemky_SpoluHodnota_iss_tl_sumdp" />
                                                    <xsl:text> €</xsl:text>
                                                </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky/egonp:DzN_Pozemky_A">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_A_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_A_ZakladDaneVymeraHodnota_iss_vym_pa_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_A_ZakladDaneHodnotaHodnota_iss_sk_m2_pa_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_A_SadzbaDaneHodnota_iss_sadz_pa_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_A_DanPomernaCastHodnota_iss_sk_pa_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky/egonp:DzN_Pozemky_B">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_B_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_B_ZakladDaneVymeraHodnota_iss_vym_pb_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_B_ZakladDaneHodnotaHodnota_iss_sk_m2_pb_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_B_SadzbaDaneHodnota_iss_sadz_pb_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_B_DanPomernaCastHodnota_iss_sk_pb_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky/egonp:DzN_Pozemky_C">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_C_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_C_ZakladDaneVymeraHodnota_iss_vym_pc_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_C_ZakladDaneHodnotaHodnota_iss_sk_m2_pc_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_C_SadzbaDaneHodnota_iss_sadz_pc_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_C_DanPomernaCastHodnota_iss_sk_pc_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky/egonp:DzN_Pozemky_D">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_D_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_D_ZakladDaneVymeraHodnota_iss_vym_pd_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_D_ZakladDaneHodnotaHodnota_iss_sk_m2_pd_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_D_SadzbaDaneHodnota_iss_sadz_pd_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_D_DanPomernaCastHodnota_iss_sk_pd_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky/egonp:DzN_Pozemky_E">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_E_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_E_ZakladDaneVymeraHodnota_iss_vym_pe_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_E_ZakladDaneHodnotaHodnota_iss_sk_m2_pe_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_E_SadzbaDaneHodnota_iss_sadz_pe_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_E_DanPomernaCastHodnota_iss_sk_pe_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky/egonp:DzN_Pozemky_F">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_F_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_F_ZakladDaneVymeraHodnota_iss_vym_pf_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_F_ZakladDaneHodnotaHodnota_iss_sk_m2_pf_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_F_SadzbaDaneHodnota_iss_sadz_pf_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_F_DanPomernaCastHodnota_iss_sk_pf_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky/egonp:DzN_Pozemky_G">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_G_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_G_ZakladDaneVymeraHodnota_iss_vym_pg_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_G_ZakladDaneHodnotaHodnota_iss_sk_m2_pg_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_G_SadzbaDaneHodnota_iss_sadz_pg_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_G_DanPomernaCastHodnota_iss_sk_pg_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Pozemky/egonp:DzN_Pozemky_H">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_H_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_H_ZakladDaneVymeraHodnota_iss_vym_ph_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_H_ZakladDaneHodnotaHodnota_iss_sk_m2_ph_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_H_SadzbaDaneHodnota_iss_sadz_ph_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Pozemky_H_DanPomernaCastHodnota_iss_sk_ph_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby">
        <fo:block margin-left="1pt" margin-top="6pt" margin-right="1pt">
            <fo:block margin-bottom="6pt">
                <fo:block margin-left="3pt" margin-top="3pt" margin-right="3pt" padding-left="1pt" padding-top="2pt" font-weight="bold">II. Daň zo stavieb
                </fo:block>
                <fo:table border-style="solid">
                    <fo:table-column column-width="250pt" />
                    <fo:table-column />
                    <fo:table-column />
                    <fo:table-column />
                    <fo:table-body>
                        <fo:table-row text-align="center" font-weight="bold">
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:value-of select="./egonp:DzN_Stavby_PredmetDane" />
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Stavby_ZakladDaneM2" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Stavby_SadzbaDane" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Stavby_DanPomernaCast" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <xsl:apply-templates select="./egonp:DzN_Stavby_A" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_B" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_C" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_D" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_E" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_F" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_G" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_H" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_I" />
                        <xsl:apply-templates select="./egonp:DzN_Stavby_J" />
                        <fo:table-row>
                            <!-- Ľavá bunka: názov -->
                            <fo:table-cell border-style="solid" border-right-style="none" number-columns-spanned="2">
                                <fo:block text-align="left" font-weight="bold">
                                    <xsl:value-of select="./egonp:DzN_Stavby_Spolu" />
                                </fo:block>
                            </fo:table-cell>
                            <!-- Pravá bunka: hodnota -->
                            <fo:table-cell border-style="solid" border-left-style="none" number-columns-spanned="2">
                                <fo:block text-align="right" font-weight="bold">
                                    <xsl:value-of select="./egonp:DzN_Stavby_SpoluHodnota_iss_tl_sumds" />
                                    <xsl:text> €</xsl:text>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_A">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_A_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_A_ZakladDaneM2Hodnota_iss_zakl_sa_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_A_SadzbaDaneHodnota_iss_sadz_sa_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_A_DanPomernaCastHodnota_iss_sk_sa_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_B">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_B_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_B_ZakladDaneM2Hodnota_iss_zakl_sb_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_B_SadzbaDaneHodnota_iss_sadz_sb_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_B_DanPomernaCastHodnota_iss_sk_sb_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_C">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_C_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_C_ZakladDaneM2Hodnota_iss_zakl_sc_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_C_SadzbaDaneHodnota_iss_sadz_sc_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_C_DanPomernaCastHodnota_iss_sk_sc_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_D">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_D_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_D_ZakladDaneM2Hodnota_iss_zakl_sd_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_D_SadzbaDaneHodnota_iss_sadz_sd_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_D_DanPomernaCastHodnota_iss_sk_sd_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_E">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_E_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_E_ZakladDaneM2Hodnota_iss_zakl_se_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_E_SadzbaDaneHodnota_iss_sadz_se_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_E_DanPomernaCastHodnota_iss_sk_se_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_F">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_F_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_F_ZakladDaneM2Hodnota_iss_zakl_sf_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_F_SadzbaDaneHodnota_iss_sadz_sf_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_F_DanPomernaCastHodnota_iss_sk_sf_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_G">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_G_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_G_ZakladDaneM2Hodnota_iss_zakl_sg_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_G_SadzbaDaneHodnota_iss_sadz_sg_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_G_DanPomernaCastHodnota_iss_sk_sg_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_H">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_H_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_H_ZakladDaneM2Hodnota_iss_zakl_sh_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_H_SadzbaDaneHodnota_iss_sadz_sh_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_H_DanPomernaCastHodnota_iss_sk_sh_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_I">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_I_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_I_ZakladDaneM2Hodnota_iss_zakl_si_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_I_SadzbaDaneHodnota_iss_sadz_si_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_I_DanPomernaCastHodnota_iss_sk_si_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Stavby/egonp:DzN_Stavby_J">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_J_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_J_ZakladDaneM2Hodnota_iss_zakl_sj_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_J_SadzbaDaneHodnota_iss_sadz_sj_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Stavby_J_DanPomernaCastHodnota_iss_sk_sj_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Byty">
        <fo:block margin-left="1pt" margin-top="6pt" margin-right="1pt">
            <fo:block margin-bottom="6pt">
                <fo:block margin-left="3pt" margin-top="3pt" margin-right="3pt" padding-left="1pt" padding-top="2pt" font-weight="bold">III. Daň z bytov
                </fo:block>
                <fo:table border-style="solid">
                    <fo:table-column column-width="250pt" />
                    <fo:table-column />
                    <fo:table-column />
                    <fo:table-column />
                    <fo:table-body>
                        <fo:table-row text-align="center" font-weight="bold">
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:value-of select="./egonp:DzN_Byty_PredmetDane" />
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Byty_ZakladDaneM2" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Bytyy_SadzbaDane" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid" display-align="center">
                                <fo:block margin-top="5px" margin-bottom="5px">
                                    <xsl:call-template name="tableHeader">
                                        <xsl:with-param name="text" select="./egonp:DzN_Byty_DanPomernaCast" />
                                    </xsl:call-template>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <xsl:apply-templates select="./egonp:DzN_Byty_A" />
                        <xsl:apply-templates select="./egonp:DzN_Byty_B" />
                        <fo:table-row>
                            <!-- Ľavá bunka: názov -->
                            <fo:table-cell border-style="solid" border-right-style="none" number-columns-spanned="2">
                                <fo:block text-align="left" font-weight="bold">
                                    <xsl:value-of select="./egonp:DzN_Byty_Spolu" />
                                </fo:block>
                            </fo:table-cell>
                            <!-- Pravá bunka: hodnota -->
                            <fo:table-cell border-style="solid" border-left-style="none" number-columns-spanned="2">
                                <fo:block text-align="right" font-weight="bold">
                                    <xsl:value-of select="./egonp:DzN_Byty_SpoluHodnota_iss_tl_sumdb" />
                                    <xsl:text> €</xsl:text>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Byty/egonp:DzN_Byty_A">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Byty_A_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Byty_A_ZakladDaneM2Hodnota_iss_zakl_ba_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Byty_A_SadzbaDaneHodnota_iss_sadz_ba_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Byty_A_DanPomernaCastHodnota_iss_sk_ba_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Byty/egonp:DzN_Byty_B">
        <fo:table-row>
            <fo:table-cell border-style="solid">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Byty_B_Text" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Byty_B_ZakladDaneM2Hodnota_iss_zakl_bb_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Byty_B_SadzbaDaneHodnota_iss_sadz_bb_memo" />
                </fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" padding="1pt" text-align="right">
                <fo:block>
                    <xsl:value-of select="./egonp:DzN_Byty_B_DanPomernaCastHodnota_iss_sk_bb_memo" />
                </fo:block>
            </fo:table-cell>
        </fo:table-row>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DzN/egonp:DzN_Suma">
        <fo:block margin-top="10px" margin-bottom="10px">
            <!-- Nadpis sekcie -->
            <fo:block font-weight="bold">
            A. Daň z nehnuteľností - splátky a lehoty splatnosti splátok
        </fo:block>
            <!-- Tabuľka: Splátky -->
            <fo:table>
                <fo:table-column column-width="33%" />
                <fo:table-column column-width="67%" />
                <fo:table-body>
                    <!-- Hlavička tabuľky -->
                    <fo:table-row font-weight="bold">
                        <fo:table-cell border-style="solid">
                            <fo:block margin-left="3px" text-align="center">
                                <xsl:value-of select="./egonp:DzN_Suma_Hodnoty_SumaSplatky_text" />
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell border-style="solid">
                            <fo:block margin-left="3px" text-align="center">
                                <xsl:value-of select="./egonp:DzN_Suma_Hodnoty_LehotaSplatnosti_text" />
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                    <!-- Dynamické riadky -->
                    <xsl:for-each select="./egonp:DzN_Suma_Hodnoty">
                        <fo:table-row>
                            <fo:table-cell border-style="solid">
                                <fo:block margin-left="3px" text-align="center">
                                    <xsl:value-of select="./egonp:DzN_Suma_Hodnoty_SumaSplatky" />
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell border-style="solid">
                                <fo:block margin-left="3px" text-align="right">
                                    <xsl:value-of select="./egonp:DzN_Suma_Hodnoty_LehotaSplatnosti" />
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </xsl:for-each>
                </fo:table-body>
            </fo:table>
            <!-- Tabuľka: Súčet -->
            <fo:table>
                <fo:table-column column-number="1" column-width="33%" />
                <fo:table-column column-number="2" column-width="33%" />
                <fo:table-column column-number="3" column-width="34%" />
                <fo:table-body>
                    <fo:table-row>
                        <!-- Ľavá bunka cez 2 stĺpce -->
                        <fo:table-cell number-columns-spanned="2" border-style="solid" border-right-style="none">
                            <fo:block text-align="left" font-weight="bold">
                                <xsl:value-of select="./egonp:DzN_Suma_Spolu_text" />
                            </fo:block>
                        </fo:table-cell>
                        <!-- Pravá bunka so sumou -->
                        <fo:table-cell border-style="solid" border-left-style="none">
                            <fo:block text-align="right" font-weight="bold">
                                <xsl:value-of select="./egonp:DzN_Suma_Spolu" />
                                <xsl:text> €</xsl:text>
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                </fo:table-body>
            </fo:table>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:PaymentData">
        <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:PaymentData/egonp:PaymentDataHodn/egonp:PaymentDataHodn_vs/text()">
            <fo:block border-width="0.3pt" margin-left="1pt" margin-top="1pt" margin-right="1pt">
                <fo:block margin-bottom="1pt">
                    <fo:table>
                        <fo:table-column />
                        <fo:table-body>
                            <fo:table-row>
                                <fo:table-cell>
                                    <fo:block margin-top="1mm" margin-right="3mm" keep-with-next="1">
                                        <fo:table>
                                            <fo:table-column />
                                            <fo:table-body>
                                                <fo:table-row>
                                                    <fo:table-cell>
                                                        <fo:block font-weight="bold" text-transform="uppercase" margin-top="1mm">
                                                            <xsl:value-of select="./egonp:PaymentData_text_PU" />
                                                        </fo:block>
                                                    </fo:table-cell>
                                                </fo:table-row>
                                            </fo:table-body>
                                        </fo:table>
                                    </fo:block>
                                    <fo:block font-weight="bold" margin-top="1mm">
                                        <xsl:value-of select="./egonp:PaymentData_text" />
                                    </fo:block>
                                    <xsl:apply-templates select="./egonp:PaymentDataHodn" />
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                    </fo:table>
                </fo:block>
            </fo:block>
        </xsl:if>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:PaymentData/egonp:PaymentDataHodn">
        <fo:block border-width="0.3pt" margin-left="1pt" margin-top="1pt" margin-right="1pt">
            <fo:block margin-bottom="1pt">
                <fo:table>
                    <fo:table-column />
                    <fo:table-column />
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block margin-top="0mm">
                                    <fo:table>
                                        <fo:table-column />
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row>
                                                <fo:table-cell width="120">
                                                    <fo:block font-weight="bold">
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_suma_text" />
                                                    </fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="200">
                                                    <fo:block>
                                                        <xsl:call-template name="urobFormatovaneCislo">
                                                            <xsl:with-param name="hodnota" select="/egonp:eForm_eGov_vystup_410226/egonp:PaymentData/egonp:PaymentDataHodn/egonp:PaymentDataHodn_sumdzn" />
                                                        </xsl:call-template>
                                                        <fo:inline></fo:inline>
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                                <fo:block margin-top="0mm">
                                    <fo:table>
                                        <fo:table-column />
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row>
                                                <fo:table-cell width="120">
                                                    <fo:block font-weight="bold">
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_mena_text" />
                                                    </fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="200">
                                                    <fo:block>
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_mena" />
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                                <fo:block margin-top="0mm">
                                    <fo:table>
                                        <fo:table-column />
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row>
                                                <fo:table-cell width="120">
                                                    <fo:block font-weight="bold">
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_cu_text" />
                                                    </fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="200">
                                                    <fo:block>
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_gatl43" />
                                                        <fo:inline color="white">___</fo:inline>
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                                <fo:block margin-top="0mm">
                                    <fo:table>
                                        <fo:table-column />
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row>
                                                <fo:table-cell width="120">
                                                    <fo:block font-weight="bold">
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_swift_text" />
                                                    </fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="200">
                                                    <fo:block>
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_gatl16_gatl18" />
                                                        <fo:inline color="white">___</fo:inline>
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                                <fo:block margin-top="0mm">
                                    <fo:table>
                                        <fo:table-column />
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row>
                                                <fo:table-cell width="120">
                                                    <fo:block font-weight="bold">
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_vs_text" />
                                                    </fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="200">
                                                    <fo:block>
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_vs" />
                                                        <fo:inline color="white">___</fo:inline>
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                                <fo:block margin-top="0mm">
                                    <xsl:if test="./egonp:PaymentDataHodn_ss/text()">
                                        <fo:table>
                                            <fo:table-column />
                                            <fo:table-column />
                                            <fo:table-body>
                                                <fo:table-row>
                                                    <fo:table-cell width="120">
                                                        <fo:block font-weight="bold">
                                                            <xsl:value-of select="./egonp:PaymentDataHodn_ss_text" />
                                                        </fo:block>
                                                    </fo:table-cell>
                                                    <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="200">
                                                        <fo:block>
                                                            <xsl:value-of select="./egonp:PaymentDataHodn_ss" />
                                                            <fo:inline color="white">___</fo:inline>
                                                        </fo:block>
                                                    </fo:table-cell>
                                                </fo:table-row>
                                            </fo:table-body>
                                        </fo:table>
                                    </xsl:if>
                                </fo:block>
                                <fo:block margin-top="0mm">
                                    <fo:table>
                                        <fo:table-column />
                                        <fo:table-column />
                                        <fo:table-body>
                                            <fo:table-row>
                                                <fo:table-cell width="120">
                                                    <fo:block font-weight="bold">
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_ks_text" />
                                                    </fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="200">
                                                    <fo:block space-after="20px">
                                                        <xsl:value-of select="./egonp:PaymentDataHodn_gatl20" />
                                                        <fo:inline color="white">___</fo:inline>
                                                    </fo:block>
                                                </fo:table-cell>
                                            </fo:table-row>
                                        </fo:table-body>
                                    </fo:table>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block margin-top="1mm">
                                    <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:PaymentData/egonp:PaymentDataHodn/egonp:PaymentDataHodn_qrcode/text()">
                                        <fo:table>
                                            <fo:table-column />
                                            <fo:table-column />
                                            <fo:table-body>
                                                <fo:table-row>
                                                    <fo:table-cell width="57">
                                                        <fo:block text-align="right" padding-left="60pt">QR kód</fo:block>
                                                        <fo:block text-align="right" padding-left="60pt">(načítaním v mobilnej aplikácii svojej banky vykonáte úhradu)</fo:block>
                                                    </fo:table-cell>
                                                    <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="273">
                                                        <fo:block>
                                                            <xsl:variable name="apostrophe">&apos;</xsl:variable>
                                                            <xsl:variable name="QRIMG_data" select="./egonp:PaymentDataHodn_qrcode" />
                                                            <xsl:variable name="QRIMG" select="concat(&apos;url(&apos;,$apostrophe,&apos;data:image/png;base64,&apos;,$QRIMG_data,$apostrophe,&apos;)&apos;)" />
                                                            <fo:external-graphic content-height="10%" scaling="uniform" src="{$QRIMG}" />
                                                        </fo:block>
                                                    </fo:table-cell>
                                                </fo:table-row>
                                            </fo:table-body>
                                        </fo:table>
                                    </xsl:if>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:PaymentData/egonp:PaymentDataHodn/egonp:PaymentDataHodn_barcode/text()">
                            <fo:table-row>
                                <fo:table-cell number-columns-spanned="2">
                                    <fo:block margin-top="1mm" margin-right="3mm">
                                        <fo:table>
                                            <fo:table-column />
                                            <fo:table-column />
                                            <fo:table-body>
                                                <fo:table-row>
                                                    <fo:table-cell border-width="0.6pt" background-color="white" padding="1pt" width="350">
                                                        <fo:block>
                                                            <xsl:variable name="apostrophe">&apos;</xsl:variable>
                                                            <xsl:variable name="barcodeIMG_data" select="./egonp:PaymentDataHodn_barcode" />
                                                            <xsl:variable name="barcodeIMG" select="concat(&apos;url(&apos;,$apostrophe,&apos;data:image/png;base64,&apos;,$barcodeIMG_data,$apostrophe,&apos;)&apos;)" />
                                                            <fo:external-graphic content-height="250%" scaling="uniform" src="{$barcodeIMG}" />
                                                        </fo:block>
                                                    </fo:table-cell>
                                                    <fo:table-cell width="140" text-align="left">
                                                        <fo:block margin-top="10px">Čiarový kód (možné načítať iba v pokladni mestského úradu)</fo:block>
                                                    </fo:table-cell>
                                                </fo:table-row>
                                            </fo:table-body>
                                        </fo:table>
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </xsl:if>
                    </fo:table-body>
                </fo:table>
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Povinnost">
        <fo:block margin-bottom="6pt" margin-top="6pt">
            <fo:block hyphenate="true" text-indent="1cm" margin-bottom="3px">
                <xsl:value-of select="./egonp:Povinnost_PovinnostText_iss_gatl34" />
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Odovodnenie">
        <fo:block margin-bottom="6pt" margin-top="6pt">
            <fo:block margin-left="3pt" margin-top="3pt" margin-right="3pt" padding-left="1pt" padding-top="2pt" font-weight="bold">Odôvodnenie:
            </fo:block>
            <fo:block hyphenate="true" text-indent="1cm" margin-bottom="3px">
                <xsl:value-of select="./egonp:Odovodnenie_Text_iss_tl_odovod" />
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Poucenie">
        <fo:block margin-bottom="6pt" margin-top="6pt">
            <fo:block margin-left="3pt" margin-top="3pt" margin-right="3pt" padding-left="1pt" padding-top="2pt" font-weight="bold">Poučenie:
            </fo:block>
            <fo:block hyphenate="true" text-indent="1cm" margin-bottom="3px">
                <xsl:value-of select="./egonp:Poucenie_Text01_iss_gatl9" />
            </fo:block>
            <fo:block hyphenate="true" text-indent="1cm">
                <xsl:value-of select="./egonp:Poucenie_Text02_iss_gatl33_gatl11_gatl10" />
            </fo:block>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:Podpis">
        <fo:block margin-bottom="6pt" margin-top="40px" text-align="center">
            <fo:table>
                <fo:table-column column-width="60%" />
                <fo:table-column />
                <fo:table-body>
                    <fo:table-row>
                        <fo:table-cell>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block margin-top="1mm">
                                <xsl:value-of select="./egonp:Podpis_Meno_iss_gatl12" />
                            </fo:block>
                            <fo:block>
                                <xsl:value-of select="./egonp:Podpis_ZaMsU_iss_gatl13" />
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                </fo:table-body>
            </fo:table>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:DorucujeSa">
        <fo:block margin-left="1pt" margin-top="6pt" margin-right="1pt">
            <fo:table>
                <fo:table-column column-width="13%" />
                <fo:table-column />
                <fo:table-body>
                    <fo:table-row>
                        <fo:table-cell>
                            <fo:block font-weight="bold">
								Doručuje sa:
							</fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:value-of select="./egonp:DorucujeSa_Meno_iss_gatl35_i_o_zast_mpf_mpf_zast" />
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                    <fo:table-row>
                        <fo:table-cell>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <xsl:call-template name="string-replace-all">
                                    <xsl:with-param name="text" select="./egonp:DorucujeSa_Adresa_iss_gatl35_i_o_zast_adr_adr_zast" />
                                    <xsl:with-param name="replace" select="'&#10;'" />
                                    <xsl:with-param name="by" select="', '" />
                                </xsl:call-template>
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                </fo:table-body>
            </fo:table>
        </fo:block>
    </xsl:template>
    <xsl:template match="egonp:eForm_eGov_vystup_410226/egonp:SekciaZakonEGovInfo">
        <fo:block margin-top="10px" font-style="italic">
            <xsl:value-of select="./egonp:Info_text" />
        </fo:block>
    </xsl:template>
    <xsl:template name="FooterTemplate">
        <fo:block border-top="1pt black solid">
            <fo:table margin-top="2pt">
                <fo:table-body>
                    <fo:table-row keep-together.within-page="always">
                        <fo:table-cell>
                            <fo:block>
                                <fo:table>
                                    <fo:table-column column-width="115.00px" />
                                    <fo:table-body>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block linefeed-treatment="preserve" text-align="center" font-size="8px">Telefón</fo:block>
                                                <fo:block margin-top="1mm" linefeed-treatment="preserve" text-align="center" font-size="6px">
                                                    <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_Telefon__TelephoneAddress/text()">
                                                        <xsl:call-template name="string-replace-all">
                                                            <xsl:with-param name="text" select="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_Telefon__TelephoneAddress/text()" />
                                                            <xsl:with-param name="replace" select="&apos;%0A&apos;" />
                                                            <xsl:with-param name="by" select="&apos;&#xD;&#xA;&apos;" />
                                                        </xsl:call-template>
                                                    </xsl:if>
                                                </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:block>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <fo:table>
                                    <fo:table-column column-width="115.00px" />
                                    <fo:table-body>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block linefeed-treatment="preserve" text-align="center" font-size="8px">E-mail</fo:block>
                                                <fo:block margin-top="1mm" linefeed-treatment="preserve" text-align="center" font-size="6px">
                                                    <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_Email/text()">
                                                        <xsl:call-template name="string-replace-all">
                                                            <xsl:with-param name="text" select="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_Email" />
                                                            <xsl:with-param name="replace" select="&apos;%0A&apos;" />
                                                            <xsl:with-param name="by" select="&apos;&#xD;&#xA;&apos;" />
                                                        </xsl:call-template>
                                                    </xsl:if>
                                                </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:block>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <fo:table>
                                    <fo:table-column column-width="115.00px" />
                                    <fo:table-body>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block linefeed-treatment="preserve" text-align="center" font-size="8px">Internet</fo:block>
                                                <fo:block margin-top="1mm" linefeed-treatment="preserve" text-align="center" font-size="6px">
                                                    <xsl:if test="//egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_WEB/text()">
                                                        <xsl:call-template name="string-replace-all">
                                                            <xsl:with-param name="text" select="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_WEB/text()" />
                                                            <xsl:with-param name="replace" select="&apos;%0A&apos;" />
                                                            <xsl:with-param name="by" select="&apos;&#xD;&#xA;&apos;" />
                                                        </xsl:call-template>
                                                    </xsl:if>
                                                </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:block>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <fo:table>
                                    <fo:table-column column-width="115.00px" />
                                    <fo:table-body>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block linefeed-treatment="preserve" text-align="center" font-size="8px">DIČ</fo:block>
                                                <fo:block margin-top="1mm" linefeed-treatment="preserve" text-align="center" font-size="6px">
                                                    <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_DIC/text()">
                                                        <xsl:call-template name="string-replace-all">
                                                            <xsl:with-param name="text" select="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_DIC" />
                                                            <xsl:with-param name="replace" select="&apos;%0A&apos;" />
                                                            <xsl:with-param name="by" select="&apos;&#xD;&#xA;&apos;" />
                                                        </xsl:call-template>
                                                    </xsl:if>
                                                </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:block>
                            <fo:block />
                        </fo:table-cell>
                        <fo:table-cell>
                            <fo:block>
                                <fo:table>
                                    <fo:table-column column-width="115.00px" />
                                    <fo:table-body>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block linefeed-treatment="preserve" text-align="center" font-size="8px">IČO</fo:block>
                                                <fo:block margin-top="1mm" linefeed-treatment="preserve" text-align="center" font-size="6px">
                                                    <xsl:if test="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_ICO/text()">
                                                        <xsl:call-template name="string-replace-all">
                                                            <xsl:with-param name="text" select="/egonp:eForm_eGov_vystup_410226/egonp:Obec/egonp:Obec_ICO" />
                                                            <xsl:with-param name="replace" select="&apos;%0A&apos;" />
                                                            <xsl:with-param name="by" select="&apos;&#xD;&#xA;&apos;" />
                                                        </xsl:call-template>
                                                    </xsl:if>
                                                </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:block>
                            <fo:block />
                        </fo:table-cell>
                    </fo:table-row>
                </fo:table-body>
            </fo:table>
        </fo:block>
    </xsl:template>
    <xsl:template name="tableHeader">
        <xsl:param name="text" />
        <xsl:choose>
            <xsl:when test="contains($text, '(')">
                <fo:block>
                    <xsl:call-template name="getFirst">
                        <xsl:with-param name="text" select="$text" />
                        <xsl:with-param name="separator" select="'('" />
                    </xsl:call-template>
                </fo:block>
                <fo:block>
                    <xsl:text>(</xsl:text>
                    <xsl:call-template name="getLast">
                        <xsl:with-param name="text" select="$text" />
                        <xsl:with-param name="separator" select="'('" />
                    </xsl:call-template>
                </fo:block>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$text" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="getFirst">
        <xsl:param name="text" />
        <xsl:param name="separator" />
        <xsl:choose>
            <xsl:when test="contains($text, $separator)">
                <xsl:value-of select="substring-before($text,$separator)" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$text" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="getLast">
        <xsl:param name="text" />
        <xsl:param name="separator" />
        <xsl:choose>
            <xsl:when test="contains($text, $separator)">
                <xsl:value-of select="substring-after($text,$separator)" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$text" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
</xsl:stylesheet>