<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format"
  xmlns:ns1="http://schemas.gov.sk/form/00166073.MSSR_ORSR_Navrh_na_zapis_druzstva.sk/1.1"
  exclude-result-prefixes="ns1">

  <xsl:output method="xml" encoding="utf-8" indent="yes"/>

  <!-- ============================================================ -->
  <!-- break (s translateBool) -->
  <!-- ============================================================ -->
  <xsl:template name="break">
  <xsl:param name="text" select="."/>
  <xsl:param name="translateBool"/>
  <xsl:choose>
    <xsl:when test="contains($text, '&#xa;')">
    <xsl:value-of select="substring-before($text, '&#xa;')"/>
    <fo:block/>
    <xsl:call-template name="break">
      <xsl:with-param name="text" select="substring-after($text, '&#xa;')"/>
      <xsl:with-param name="translateBool" select="$translateBool"/>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:choose>
      <xsl:when test="$translateBool = 'true'">
      <xsl:if test="$text = 'true'">Áno</xsl:if>
      <xsl:if test="$text = 'false'">Nie</xsl:if>
      </xsl:when>
      <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
    </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- getValue -->
  <!-- ============================================================ -->
  <xsl:template name="getValue">
  <xsl:param name="value"/>
  <xsl:param name="translateBool"/>
  <xsl:param name="stav"/>
  <xsl:choose>
    <xsl:when test="$stav = 'true'">
    <fo:inline color="green" font-style="italic">
      <xsl:call-template name="break">
      <xsl:with-param name="text" select="$value"/>
      <xsl:with-param name="translateBool" select="$translateBool"/>
      </xsl:call-template>
    </fo:inline>
    </xsl:when>
    <xsl:when test="$stav = 'false'">
    <fo:inline color="red" font-weight="bold">
      <xsl:call-template name="break">
      <xsl:with-param name="text" select="$value"/>
      <xsl:with-param name="translateBool" select="$translateBool"/>
      </xsl:call-template>
    </fo:inline>
    </xsl:when>
    <xsl:otherwise>
    <xsl:call-template name="break">
      <xsl:with-param name="text" select="$value"/>
      <xsl:with-param name="translateBool" select="$translateBool"/>
    </xsl:call-template>
    </xsl:otherwise>
  </xsl:choose>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- compareValuesToCheckField -->
  <!-- ============================================================ -->
  <xsl:template name="compareValuesToCheckField">
  <xsl:param name="value1"/>
  <xsl:param name="value2"/>
  <xsl:choose>
    <xsl:when test="$value1 = $value2">X</xsl:when>
    <xsl:otherwise><fo:inline color="white">X</fo:inline></xsl:otherwise>
  </xsl:choose>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- formatDate (plná verzia) -->
  <!-- ============================================================ -->
  <xsl:template name="formatDate">
  <xsl:param name="DateTime"/>
  <xsl:param name="OutputFormat"/>
  <xsl:if test="string-length($DateTime) &gt; 0">
    <xsl:variable name="year"     select="substring($DateTime,1,4)"/>
    <xsl:variable name="mo-temp"  select="substring-after($DateTime,'-')"/>
    <xsl:variable name="mo"       select="substring-before($mo-temp,'-')"/>
    <xsl:variable name="day-temp" select="substring-after($mo-temp,'-')"/>
    <xsl:variable name="day"      select="substring($day-temp,1,2)"/>
    <xsl:choose>
    <xsl:when test="$OutputFormat = 'd'"><xsl:value-of select="$day"/></xsl:when>
    <xsl:when test="$OutputFormat = 'm'"><xsl:value-of select="$mo"/></xsl:when>
    <xsl:when test="$OutputFormat = 'Y'"><xsl:value-of select="$year"/></xsl:when>
    <xsl:when test="$OutputFormat = 'd. F Y'">
      <xsl:value-of select="$day"/>
      <xsl:text>. </xsl:text>
      <xsl:choose>
      <xsl:when test="$mo = '01'">január</xsl:when>
      <xsl:when test="$mo = '02'">február</xsl:when>
      <xsl:when test="$mo = '03'">marec</xsl:when>
      <xsl:when test="$mo = '04'">apríl</xsl:when>
      <xsl:when test="$mo = '05'">máj</xsl:when>
      <xsl:when test="$mo = '06'">jún</xsl:when>
      <xsl:when test="$mo = '07'">júl</xsl:when>
      <xsl:when test="$mo = '08'">august</xsl:when>
      <xsl:when test="$mo = '09'">september</xsl:when>
      <xsl:when test="$mo = '10'">október</xsl:when>
      <xsl:when test="$mo = '11'">november</xsl:when>
      <xsl:when test="$mo = '12'">december</xsl:when>
      </xsl:choose>
      <xsl:text> </xsl:text>
      <xsl:value-of select="$year"/>
    </xsl:when>
    <xsl:when test="$OutputFormat = 'd.m.Y'">
      <xsl:value-of select="concat($day,'.',$mo,'.',$year)"/>
    </xsl:when>
    <xsl:otherwise><xsl:value-of select="concat($day,'.',$mo,'.',$year)"/></xsl:otherwise>
    </xsl:choose>
  </xsl:if>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- tableRow -->
  <!-- ============================================================ -->
  <xsl:template name="tableRow">
  <xsl:param name="label"/>
  <xsl:param name="value"/>
  <xsl:param name="translateBool"/>
  <xsl:param name="isDate"/>
  <xsl:param name="bold" select="'true'"/>
  <xsl:param name="boldValue" select="'false'"/>
  <xsl:param name="stav"/>
  <xsl:param name="paddingStart" select="'2pt'"/>
  <xsl:param name="skipFirstCol" select="'false'"/>
  <fo:table-row>
    <xsl:if test="$skipFirstCol != 'true'"><fo:table-cell border="none" padding="2pt"><fo:block/></fo:table-cell></xsl:if>
    <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt">
    <xsl:attribute name="padding-start"><xsl:value-of select="$paddingStart"/></xsl:attribute>
    <fo:block font-size="8pt">
      <xsl:if test="$bold != 'false'">
      <xsl:attribute name="font-weight">bold</xsl:attribute>
      </xsl:if>
      <xsl:value-of select="$label"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
    <fo:block font-size="8pt">
      <xsl:if test="$boldValue = 'true'">
      <xsl:attribute name="font-weight">bold</xsl:attribute>
      </xsl:if>
      <xsl:choose>
      <xsl:when test="$isDate = 'true'">
        <xsl:call-template name="formatDate">
        <xsl:with-param name="DateTime" select="$value"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="getValue">
        <xsl:with-param name="value" select="$value"/>
        <xsl:with-param name="translateBool" select="$translateBool"/>
        <xsl:with-param name="stav" select="$stav"/>
        </xsl:call-template>
      </xsl:otherwise>
      </xsl:choose>
    </fo:block>
    </fo:table-cell>
  </fo:table-row>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- subheaderRow -->
  <!-- ============================================================ -->
  <xsl:template name="subheaderRow">
  <xsl:param name="text"/>
  <xsl:param name="skipFirstCol" select="'false'"/>
  <fo:table-row>
    <xsl:if test="$skipFirstCol != 'true'"><fo:table-cell border="none" padding="2pt"><fo:block/></fo:table-cell></xsl:if>
    <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
    <fo:block font-size="8pt" font-weight="bold">
      <xsl:value-of select="$text"/>
    </fo:block>
    </fo:table-cell>
  </fo:table-row>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- sectionHeader -->
  <!-- ============================================================ -->
  <xsl:template name="sectionHeader">
  <xsl:param name="text"/>
  <fo:table-row>
    <fo:table-cell border="none" padding="2pt"><fo:block/></fo:table-cell>
    <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
    <fo:block font-size="9pt" font-weight="bold"><xsl:value-of select="$text"/></fo:block>
    </fo:table-cell>
  </fo:table-row>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- zapisovanyUdajHeader (FUPS-typ) -->
  <!-- ============================================================ -->
  <xsl:template name="zapisovanyUdajHeader">
  <fo:table-row>
    <fo:table-cell border="0.5pt solid black" padding="6pt" display-align="center">
    <fo:block/>
    </fo:table-cell>
    <fo:table-cell border="0.5pt solid black" padding="3pt" text-align="center" display-align="center">
    <fo:block font-size="8pt" font-weight="bold">ZAPISOVANÝ ÚDAJ</fo:block>
    </fo:table-cell>
    <fo:table-cell border="0.5pt solid black" padding="0pt" number-columns-spanned="2" display-align="center">
    <fo:table table-layout="fixed" width="100%">
      <fo:table-column column-width="75%"/>
      <fo:table-column column-width="25%"/>
      <fo:table-body>
      <fo:table-row>
        <fo:table-cell display-align="center" text-align="center" padding="4pt">
        <fo:block font-size="8pt" font-weight="bold">ZÁPIS</fo:block>
        </fo:table-cell>
        <fo:table-cell border-left="0.5pt solid black" display-align="center" padding="4pt">
        <fo:block/>
        </fo:table-cell>
      </fo:table-row>
      </fo:table-body>
    </fo:table>
    </fo:table-cell>
  </fo:table-row>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- adresaRows (5 riadkov a-e) -->
  <!-- ============================================================ -->
  <xsl:template name="adresaRows">
  <xsl:param name="adresa"/>
  <xsl:call-template name="tableRow">
    <xsl:with-param name="label" select="'a) Názov ulice/verejného priestranstva'"/>
    <xsl:with-param name="value" select="$adresa/ns1:Ulica"/>
    <xsl:with-param name="bold" select="'false'"/>
    <xsl:with-param name="paddingStart" select="'10pt'"/>
  </xsl:call-template>
  <xsl:call-template name="tableRow">
    <xsl:with-param name="label" select="'b) Súpisné/orientačné číslo'"/>
    <xsl:with-param name="value" select="$adresa/ns1:Cislo"/>
    <xsl:with-param name="bold" select="'false'"/>
    <xsl:with-param name="paddingStart" select="'10pt'"/>
  </xsl:call-template>
  <xsl:call-template name="tableRow">
    <xsl:with-param name="label" select="'c) Názov obce'"/>
    <xsl:with-param name="value" select="$adresa/ns1:Obec/ns1:Value"/>
    <xsl:with-param name="bold" select="'false'"/>
    <xsl:with-param name="paddingStart" select="'10pt'"/>
  </xsl:call-template>
  <xsl:call-template name="tableRow">
    <xsl:with-param name="label" select="'d) PSČ'"/>
    <xsl:with-param name="value" select="$adresa/ns1:Psc"/>
    <xsl:with-param name="bold" select="'false'"/>
    <xsl:with-param name="paddingStart" select="'10pt'"/>
  </xsl:call-template>
  <xsl:call-template name="tableRow">
    <xsl:with-param name="label" select="'e) Štát'"/>
    <xsl:with-param name="value" select="$adresa/ns1:Stat/ns1:Value"/>
    <xsl:with-param name="bold" select="'false'"/>
    <xsl:with-param name="paddingStart" select="'10pt'"/>
  </xsl:call-template>
  </xsl:template>

  <!-- ============================================================ -->
  <!-- HLAVNÁ ŠABLÓNA -->
  <!-- ============================================================ -->
  <xsl:template match="/">
  <fo:root>
    <fo:layout-master-set>
    <fo:simple-page-master master-name="A4"
      page-height="297mm" page-width="210mm"
      margin-top="10mm" margin-bottom="10mm"
      margin-left="15mm" margin-right="15mm">
      <fo:region-body margin-top="8mm" margin-bottom="10mm"/>
      <fo:region-before extent="8mm"/>
      <fo:region-after extent="10mm"/>
    </fo:simple-page-master>
    </fo:layout-master-set>

    <fo:page-sequence master-reference="A4" font-family="Arial, Helvetica, sans-serif" font-size="9pt">

    <fo:static-content flow-name="xsl-region-after">
      <fo:block font-size="7pt" text-align="center" color="#666" space-before="18pt">
      Strana <fo:page-number/> / <fo:page-number-citation ref-id="last-page"/>
      </fo:block>
    </fo:static-content>

    <fo:flow flow-name="xsl-region-body">

      <!-- NADPIS -->
      <fo:block space-after="18pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="100%"/>
        <fo:table-body>
        <fo:table-row>
          <fo:table-cell padding="10pt" text-align="center">
          <fo:block font-size="14pt" font-weight="bold">
            NÁVRH NA PRVOZÁPIS DRUŽSTVA
            <fo:block font-size="14pt"/>
            DO OBCHODNÉHO REGISTRA
          </fo:block>
          </fo:table-cell>
        </fo:table-row>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- OBCHODNÝ REGISTER (pravý horný box) -->
      <fo:block space-after="8pt">
      <fo:table table-layout="fixed" width="100%">
        <fo:table-column column-width="55%"/>
        <fo:table-column column-width="45%"/>
        <fo:table-body>
        <fo:table-row>
          <fo:table-cell><fo:block/></fo:table-cell>
          <fo:table-cell>
          <fo:table table-layout="fixed" width="100%" border="2pt solid black">
            <fo:table-column column-width="60%"/>
            <fo:table-column column-width="40%"/>
            <fo:table-body>
            <fo:table-row>
              <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
              <fo:block font-size="8pt" font-weight="bold">Obchodný register</fo:block>
              </fo:table-cell>
            </fo:table-row>
            <fo:table-row>
              <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
              <fo:block font-size="8pt">Súd <xsl:call-template name="getValue">
                <xsl:with-param name="value" select="/ns1:FUPD/ns1:ObchodnyRegister/ns1:OkresnySud"/>
              </xsl:call-template></fo:block>
              </fo:table-cell>
            </fo:table-row>
            <fo:table-row>
              <fo:table-cell border="0.5pt solid black" padding="2pt">
              <fo:block font-size="8pt">Ulica <xsl:call-template name="getValue">
                <xsl:with-param name="value" select="/ns1:FUPD/ns1:ObchodnyRegister/ns1:Ulica"/>
              </xsl:call-template></fo:block>
              </fo:table-cell>
              <fo:table-cell border="0.5pt solid black" padding="2pt">
              <fo:block font-size="8pt">Číslo <xsl:call-template name="getValue">
                <xsl:with-param name="value" select="/ns1:FUPD/ns1:ObchodnyRegister/ns1:Cislo"/>
              </xsl:call-template></fo:block>
              </fo:table-cell>
            </fo:table-row>
            <fo:table-row>
              <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
              <fo:block font-size="8pt">Obec <xsl:call-template name="getValue">
                <xsl:with-param name="value" select="/ns1:FUPD/ns1:ObchodnyRegister/ns1:Obec"/>
              </xsl:call-template></fo:block>
              </fo:table-cell>
            </fo:table-row>
            <fo:table-row>
              <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
              <fo:block font-size="8pt">PSČ <xsl:call-template name="getValue">
                <xsl:with-param name="value" select="/ns1:FUPD/ns1:ObchodnyRegister/ns1:Psc"/>
              </xsl:call-template></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>

      <!-- NAVRHOVATELIA FO -->
      <xsl:for-each select="/ns1:FUPD/ns1:NavrhovatelFO">
      <fo:block space-after="8pt">
        <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="45%"/>
        <fo:table-column column-width="55%"/>
        <fo:table-header>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="2">
            <fo:block font-size="9pt" font-weight="bold">NAVRHOVATEĽ</fo:block>
          </fo:table-cell>
          </fo:table-row>
        </fo:table-header>
        <fo:table-body>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="10pt">
            <fo:block font-size="8pt">Titul pred menom</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:TitulPred"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="10pt">
            <fo:block font-size="8pt">Meno</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:Meno"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="10pt">
            <fo:block font-size="8pt">Priezvisko</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:Priezvisko"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="10pt">
            <fo:block font-size="8pt">Titul za menom</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:TitulZa"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="10pt" number-columns-spanned="2">
            <fo:block font-size="8pt" font-weight="bold">Bydlisko</fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="20pt">
            <fo:block font-size="8pt">Názov ulice/verejného priestranstva</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Adresa/ns1:Ulica"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="20pt">
            <fo:block font-size="8pt">Súpisné/orientačné číslo</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Adresa/ns1:Cislo"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="20pt">
            <fo:block font-size="8pt">Názov obce</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Adresa/ns1:Obec/ns1:Value"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="20pt">
            <fo:block font-size="8pt">PSČ</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Adresa/ns1:Psc"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="20pt">
            <fo:block font-size="8pt">Štát</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Adresa/ns1:Stat/ns1:Value"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
        </fo:table>
      </fo:block>
      </xsl:for-each>

      <!-- ÚVODNÝ TEXT -->
      <fo:block font-size="8pt" space-before="12pt" space-after="12pt">
      Na základe § 43 a nasl. zákona č. 29/2026 Z. z. o obchodnom registri a o zmene a doplnení niektorých
      zákonov (zákon o obchodnom registri) navrhujem (navrhujeme) <fo:inline font-weight="bold">registráciu týchto údajov:</fo:inline>
      </fo:block>

      <!-- TABUĽKA 1: I – V (Základné údaje + Predmet podnikania) -->
      <fo:block space-after="12pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="9%"/>
        <fo:table-column column-width="37%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-body>

        <xsl:call-template name="zapisovanyUdajHeader"/>

        <!-- I. Obchodné meno -->
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
          <fo:block font-weight="bold" text-align="center">I</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
          <fo:block font-size="9pt" font-weight="bold">Obchodné meno</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2" display-align="center">
          <fo:block font-size="8pt">
            <xsl:call-template name="getValue">
            <xsl:with-param name="value" select="/ns1:FUPD/ns1:ObchodneMeno"/>
            </xsl:call-template>
          </fo:block>
          </fo:table-cell>
        </fo:table-row>

        <!-- II. Sídlo -->
        <fo:table-row>
          <fo:table-cell border-left="0.5pt solid black" border-right="0.5pt solid black" border-top="0.5pt solid black" border-bottom="none" padding="3pt" display-align="center">
          <fo:block font-weight="bold" text-align="center">II</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
          <fo:block font-size="9pt" font-weight="bold">Sídlo</fo:block>
          </fo:table-cell>
        </fo:table-row>
        <xsl:call-template name="tableRow">
          <xsl:with-param name="label" select="'a) Názov ulice/verejného priestranstva'"/>
          <xsl:with-param name="value" select="/ns1:FUPD/ns1:Sidlo/ns1:Ulica"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
        </xsl:call-template>
        <xsl:call-template name="tableRow">
          <xsl:with-param name="label" select="'b) Súpisné/orientačné číslo'"/>
          <xsl:with-param name="value" select="/ns1:FUPD/ns1:Sidlo/ns1:Cislo"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
        </xsl:call-template>
        <xsl:call-template name="tableRow">
          <xsl:with-param name="label" select="'c) Názov obce '"/>
          <xsl:with-param name="value" select="/ns1:FUPD/ns1:Sidlo/ns1:Obec/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
        </xsl:call-template>
        <xsl:call-template name="tableRow">
          <xsl:with-param name="label" select="'d) PSČ'"/>
          <xsl:with-param name="value" select="/ns1:FUPD/ns1:Sidlo/ns1:Psc"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
        </xsl:call-template>

        <!-- III. IČO -->
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
          <fo:block font-weight="bold" text-align="center">III</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
          <fo:block font-size="8pt" font-weight="bold">IČO</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2" display-align="center">
          <fo:block font-size="8pt">
            <xsl:call-template name="getValue">
            <xsl:with-param name="value" select="/ns1:FUPD/ns1:Ico"/>
            </xsl:call-template>
          </fo:block>
          </fo:table-cell>
        </fo:table-row>

        <!-- IV. Právna forma -->
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
          <fo:block font-weight="bold" text-align="center">IV</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
          <fo:block font-size="8pt" font-weight="bold">Právna forma</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2" display-align="center" text-align="center">
          <fo:block font-size="8pt" font-weight="bold">Družstvo</fo:block>
          </fo:table-cell>
        </fo:table-row>

        <!-- V. Predmet podnikania -->
        <fo:table-row>
          <fo:table-cell border-left="0.5pt solid black" border-right="0.5pt solid black" border-top="0.5pt solid black" border-bottom="none" padding="3pt" display-align="center">
          <fo:block font-weight="bold" text-align="center">V</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
          <fo:block font-size="8pt" font-weight="bold">Predmet podnikania (činnosti)</fo:block>
          </fo:table-cell>
        </fo:table-row>
        <xsl:for-each select="/ns1:FUPD/ns1:PredmetPodnikania">
          <xsl:call-template name="tableRow">
          <xsl:with-param name="label" select="'Poradové číslo'"/>
          <xsl:with-param name="value" select="ns1:PoradoveCislo"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow">
          <xsl:with-param name="label" select="'Predmet podnikania (činnosti)'"/>
          <xsl:with-param name="value" select="ns1:Cinnost"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
        </xsl:for-each>

        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- TABUĽKA 2: VI Štatutárny orgán -->
      <fo:block space-after="12pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="9%"/>
        <fo:table-column column-width="37%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-body>
        <xsl:call-template name="zapisovanyUdajHeader"/>

        <xsl:variable name="StatutarnyOrganRowSpan" select="3 + (count(/ns1:FUPD/ns1:StatutarnyOrganFO) * 15) + 2"/>
        <!-- VI header + checkboxy: riadok 1 -->
        <fo:table-row>
          <fo:table-cell border-left="0.5pt solid black" border-right="0.5pt solid black" border-top="0.5pt solid black" border-bottom="none" padding="3pt" display-align="before">
          <xsl:attribute name="number-rows-spanned"><xsl:value-of select="$StatutarnyOrganRowSpan"/></xsl:attribute>
          <fo:block font-weight="bold" text-align="center">VI</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center" number-rows-spanned="3">
          <fo:block font-size="8pt" font-weight="bold">Štatutárny orgán</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
            <fo:block font-size="8pt" font-weight="bold">
            <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
              <xsl:call-template name="compareValuesToCheckField">
              <xsl:with-param name="value1" select="/ns1:FUPD/ns1:StatutarnyOrganTyp"/>
              <xsl:with-param name="value2" select="'Predstavenstvo'"/>
              </xsl:call-template>
            </fo:inline>&#160;Predstavenstvo
            </fo:block>
          </fo:table-cell>
        </fo:table-row>
        <!-- VI checkboxy: riadok 2 -->
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
          <fo:block font-size="8pt" font-weight="bold">
            <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
            <xsl:call-template name="compareValuesToCheckField">
              <xsl:with-param name="value1" select="/ns1:FUPD/ns1:StatutarnyOrganTyp"/>
              <xsl:with-param name="value2" select="'PredsedaDruzstva'"/>
            </xsl:call-template>
            </fo:inline>&#160;Predseda družstva
          </fo:block>
          </fo:table-cell>
        </fo:table-row>
        <!-- VI checkboxy: riadok 3 -->
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
          <fo:block font-size="8pt" font-weight="bold">
            <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
            <xsl:call-template name="compareValuesToCheckField">
              <xsl:with-param name="value1" select="/ns1:FUPD/ns1:StatutarnyOrganTyp"/>
              <xsl:with-param name="value2" select="'ClenDruzstva'"/>
            </xsl:call-template>
            </fo:inline>&#160;Člen družstva poverený členskou schôdzou
          </fo:block>
          </fo:table-cell>
        </fo:table-row>

        <xsl:for-each select="/ns1:FUPD/ns1:StatutarnyOrganFO">
            <fo:table-row>
            <fo:table-cell border="0.5pt solid black" padding="2pt">
              <fo:block font-size="8pt" font-weight="bold">Funkcia</fo:block>
            </fo:table-cell>
            <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
              <fo:block font-size="8pt" font-weight="bold">
              <xsl:value-of select="ns1:FunkciaClenaStatutarnehoOrganu/ns1:Value"/>
              </fo:block>
            </fo:table-cell>
            </fo:table-row>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'1. Titul pred menom'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulPred"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'2. Meno'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:Meno"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'3. Priezvisko'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:Priezvisko"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'4. Titul za menom'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulZa"/>
          </xsl:call-template>
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'5. Bydlisko'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a) Názov ulice/verejného priestranstva'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Ulica"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'b) Súpisné/orientačné číslo'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Cislo"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'c) Názov obce'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Obec/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'d) PSČ'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Psc"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'e) Štát'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Stat/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'6. Dátum narodenia'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:DatumNarodenia"/>
          <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'7. Rodné číslo'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:RodneCislo"/>
          </xsl:call-template>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="2pt">
            <fo:block font-size="8pt" font-weight="bold">8. Iný identifikátor, ak rodné číslo v SR nie je pridelené</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
            <fo:block font-size="8pt">
            <xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:TypInyIdentifikator/ns1:Value"/></xsl:call-template>
            <xsl:if test="ns1:Osoba/ns1:TypInyIdentifikator/ns1:Value != ''"><fo:block/></xsl:if>
            <xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:InyIdentifikacnyUdaj"/></xsl:call-template>
            </fo:block>
          </fo:table-cell>
          </fo:table-row>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'9. Deň vzniku funkcie'"/>
          <xsl:with-param name="value" select="ns1:DenVznikuFunkcie"/>
          <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
        </xsl:for-each>

        <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'Spôsob konania štatutárneho orgánu v mene družstva'"/>
        </xsl:call-template>
        <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'Spôsob konania štatutárneho orgánu v mene družstva'"/>
          <xsl:with-param name="value" select="/ns1:FUPD/ns1:StatutarnyOrganSposobKonania"/>
        </xsl:call-template>

        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- TABULKA 3: VII Organizačná zložka -->
      <fo:block space-after="12pt">
      <xsl:variable name="OrganizacnaZlozkaRowSpan" select="(count(/ns1:FUPD/ns1:OrganizacnaZlozka) * 8) + (count(/ns1:FUPD/ns1:OrganizacnaZlozka/ns1:OrganizacnaZlozka/ns1:PredmetPodnikania) * 2) + (count(/ns1:FUPD/ns1:OrganizacnaZlozka/ns1:OrganizacnaZlozka/ns1:Veduci) * 15)"/>
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="9%"/>
        <fo:table-column column-width="37%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-body>
        <xsl:call-template name="zapisovanyUdajHeader"/>
        <xsl:for-each select="/ns1:FUPD/ns1:OrganizacnaZlozka">
          <fo:table-row>
          <xsl:if test="position()=1">
            <fo:table-cell border-left="0.5pt solid black" border-right="0.5pt solid black" border-top="0.5pt solid black" border-bottom="none" padding="3pt" display-align="before">
            <xsl:attribute name="number-rows-spanned"><xsl:value-of select="$OrganizacnaZlozkaRowSpan"/></xsl:attribute>
            <fo:block font-weight="bold" text-align="center">VII</fo:block>
            </fo:table-cell>
          </xsl:if>
          <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
            <fo:block font-size="8pt" font-weight="bold">Organizačná zložka</fo:block>
          </fo:table-cell>
          </fo:table-row>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'1. Označenie'"/>
          <xsl:with-param name="value" select="ns1:OrganizacnaZlozka/ns1:Oznacenie"/>
          </xsl:call-template>
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'2. Adresa umiestnenia'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a) Názov ulice/verejného priestranstva'"/>
          <xsl:with-param name="value" select="ns1:OrganizacnaZlozka/ns1:AdresaUmiestnenia/ns1:Ulica"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'b) Súpisné/orientačné číslo'"/>
          <xsl:with-param name="value" select="ns1:OrganizacnaZlozka/ns1:AdresaUmiestnenia/ns1:Cislo"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'c) Názov obce'"/>
          <xsl:with-param name="value" select="ns1:OrganizacnaZlozka/ns1:AdresaUmiestnenia/ns1:Obec/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'d) PSČ'"/>
          <xsl:with-param name="value" select="ns1:OrganizacnaZlozka/ns1:AdresaUmiestnenia/ns1:Psc"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'3. Predmet podnikania (činnosti)'"/>
          </xsl:call-template>
          <xsl:for-each select="ns1:OrganizacnaZlozka/ns1:PredmetPodnikania">
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'Poradové číslo'"/>
            <xsl:with-param name="value" select="ns1:PoradoveCislo"/>
            <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'Predmet podnikania (činnosti)'"/>
            <xsl:with-param name="value" select="ns1:Cinnost"/>
            <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          </xsl:for-each>
          <xsl:for-each select="ns1:OrganizacnaZlozka/ns1:Veduci">
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="text" select="'4. Vedúci'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'a) Titul pred menom'"/>
            <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulPred"/>
            <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'b) Meno'"/>
            <xsl:with-param name="value" select="ns1:Osoba/ns1:Meno"/>
            <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'c) Priezvisko'"/>
            <xsl:with-param name="value" select="ns1:Osoba/ns1:Priezvisko"/>
            <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'d) Titul za menom'"/>
            <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulZa"/>
            <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'e) Bydlisko'"/>
            <xsl:with-param name="value" select="''"/>
            <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'e1) Názov ulice/verejného priestranstva'"/>
            <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Ulica"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'e2) Súpisné/orientačné číslo'"/>
            <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Cislo"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'e3) Názov obce'"/>
            <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Obec/ns1:Value"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'e4) PSČ'"/>
            <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Psc"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'e5) Štát'"/>
            <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Stat/ns1:Value"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'f) Dátum narodenia'"/>
            <xsl:with-param name="value" select="ns1:Osoba/ns1:DatumNarodenia"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'g) Rodné číslo'"/>
            <xsl:with-param name="value" select="ns1:Osoba/ns1:RodneCislo"/>
            <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <fo:table-row>
            <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="2pt">
            <fo:block font-size="8pt">h) Iný identifikátor, ak rodné číslo v SR nie je pridelené</fo:block>
            </fo:table-cell>
            <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
            <fo:block font-size="8pt">
              <xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:TypInyIdentifikator/ns1:Value"/></xsl:call-template>
              <xsl:if test="ns1:Osoba/ns1:TypInyIdentifikator/ns1:Value != ''"><fo:block/></xsl:if>
              <xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:InyIdentifikacnyUdaj"/></xsl:call-template>
            </fo:block>
            </fo:table-cell>
          </fo:table-row>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'i) Deň vzniku funkcie'"/>
            <xsl:with-param name="value" select="ns1:DenVznikuFunkcie"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
          </xsl:for-each>
        </xsl:for-each>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- TABULKA 4: VIII Prokúra -->
      <fo:block space-after="12pt">
      <xsl:variable name="ProkuristaRowSpan" select="1 + (count(/ns1:FUPD/ns1:Prokurista) * 15) + 2"/>
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="9%"/>
        <fo:table-column column-width="37%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-body>
        <xsl:call-template name="zapisovanyUdajHeader"/>
        <fo:table-row>
          <fo:table-cell border-left="0.5pt solid black" border-right="0.5pt solid black" border-top="0.5pt solid black" border-bottom="none" padding="3pt" display-align="before">
          <xsl:attribute name="number-rows-spanned"><xsl:value-of select="$ProkuristaRowSpan"/></xsl:attribute>
          <fo:block font-weight="bold" text-align="center">VIII</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
          <fo:block font-size="8pt" font-weight="bold">Prokúra</fo:block>
          </fo:table-cell>
        </fo:table-row>
        <xsl:for-each select="/ns1:FUPD/ns1:Prokurista">
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'Prokurista'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'1. Titul pred menom'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulPred"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'2. Meno'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:Meno"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'3. Priezvisko'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:Priezvisko"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'4. Titul za menom'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulZa"/>
          </xsl:call-template>
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'5. Bydlisko'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a) Názov ulice/verejného priestranstva'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Ulica"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'b) Súpisné/orientačné číslo'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Cislo"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'c) Názov obce'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Obec/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'d) PSČ'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Psc"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'e) Štát'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Stat/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'6. Dátum narodenia'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:DatumNarodenia"/>
          <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'7. Rodné číslo'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:RodneCislo"/>
          </xsl:call-template>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="2pt">
            <fo:block font-size="8pt" font-weight="bold">8. Iný identifikátor, ak rodné číslo v SR nie je pridelené</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
            <fo:block font-size="8pt">
            <xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:TypInyIdentifikator/ns1:Value"/></xsl:call-template>
            <xsl:if test="ns1:Osoba/ns1:TypInyIdentifikator/ns1:Value != ''"><fo:block/></xsl:if>
            <xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:InyIdentifikacnyUdaj"/></xsl:call-template>
            </fo:block>
          </fo:table-cell>
          </fo:table-row>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'9. Deň vzniku funkcie'"/>
          <xsl:with-param name="value" select="ns1:DenVznikuFunkcie"/>
          <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
        </xsl:for-each>
        <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'Spôsob konania prokuristu (prokuristov) za podnikateľa'"/>
        </xsl:call-template>
        <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'Spôsob konania prokuristu (prokuristov) za podnikateľa'"/>
          <xsl:with-param name="value" select="/ns1:FUPD/ns1:ProkuraSposobKonania"/>
        </xsl:call-template>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- TABULKA 5: IX Kontrolná komisia -->
      <fo:block space-after="12pt">
      <xsl:variable name="KontrolnaKomisiaRowSpan" select="1 + (count(/ns1:FUPD/ns1:KontrolnaKomisia) * 15)"/>
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="9%"/>
        <fo:table-column column-width="37%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-body>
        <xsl:call-template name="zapisovanyUdajHeader"/>
        <fo:table-row>
          <fo:table-cell border-left="0.5pt solid black" border-right="0.5pt solid black" border-top="0.5pt solid black" border-bottom="none" padding="3pt" display-align="before">
          <xsl:attribute name="number-rows-spanned"><xsl:value-of select="$KontrolnaKomisiaRowSpan"/></xsl:attribute>
          <fo:block font-weight="bold" text-align="center">IX</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
          <fo:block font-size="8pt" font-weight="bold">Kontrolná komisia</fo:block>
          </fo:table-cell>
        </fo:table-row>
        <xsl:for-each select="/ns1:FUPD/ns1:KontrolnaKomisia">
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'Člen kontrolnej komisie'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'1. Titul pred menom'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulPred"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'2. Meno'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:Meno"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'3. Priezvisko'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:Priezvisko"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'4. Titul za menom'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulZa"/>
          </xsl:call-template>
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'5. Bydlisko'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a) Názov ulice/verejného priestranstva'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Ulica"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'b) Súpisné/orientačné číslo'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Cislo"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'c) Názov obce'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Obec/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'d) PSČ'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Psc"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'e) Štát'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Stat/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'6. Dátum narodenia'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:DatumNarodenia"/>
          <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'7. Rodné číslo'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:RodneCislo"/>
          </xsl:call-template>
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding-top="2pt" padding-bottom="2pt" padding-end="2pt" padding-start="2pt">
            <fo:block font-size="8pt" font-weight="bold">8. Iný identifikátor, ak rodné číslo v SR nie je pridelené</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
            <fo:block font-size="8pt">
            <xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:TypInyIdentifikator/ns1:Value"/></xsl:call-template>
            <xsl:if test="ns1:Osoba/ns1:TypInyIdentifikator/ns1:Value != ''"><fo:block/></xsl:if>
            <xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Osoba/ns1:InyIdentifikacnyUdaj"/></xsl:call-template>
            </fo:block>
          </fo:table-cell>
          </fo:table-row>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'9. Deň vzniku funkcie'"/>
          <xsl:with-param name="value" select="ns1:DenVznikuFunkcie"/>
          <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
        </xsl:for-each>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- TABULKA 6: X Konečný užívateľ výhod -->
      <fo:block space-after="12pt">
      <xsl:variable name="KUVRowSpan" select="1 + (count(/ns1:FUPD/ns1:KonecniUzivateliaVyhod) * 26)"/>
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="9%"/>
        <fo:table-column column-width="37%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-body>
        <xsl:call-template name="zapisovanyUdajHeader"/>
        <fo:table-row>
          <fo:table-cell border-left="0.5pt solid black" border-right="0.5pt solid black" border-top="0.5pt solid black" border-bottom="none" padding="3pt" display-align="before">
          <xsl:attribute name="number-rows-spanned"><xsl:value-of select="$KUVRowSpan"/></xsl:attribute>
          <fo:block font-weight="bold" text-align="center">X</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
          <fo:block font-size="8pt" font-weight="bold">Koneční užívatelia výhod</fo:block>
          </fo:table-cell>
        </fo:table-row>
        <xsl:for-each select="/ns1:FUPD/ns1:KonecniUzivateliaVyhod">
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'Konečný užívateľ výhod'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'1. Titul pred menom'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulPred"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'2. Meno'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:Meno"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'3. Priezvisko'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:Priezvisko"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'4. Titul za menom'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:TitulZa"/>
          </xsl:call-template>
          <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="text" select="'5. Adresa trvalého pobytu/iného pobytu'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a) Názov ulice/verejného priestranstva'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Ulica"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'b) Súpisné/orientačné číslo'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Cislo"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'c) Názov obce'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Obec/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'d) PSČ'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Psc"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'e) Štát'"/>
          <xsl:with-param name="value" select="ns1:Bydlisko/ns1:Stat/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          <xsl:with-param name="paddingStart" select="'10pt'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'6. Rodné číslo, ak bolo pridelené'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:RodneCislo"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'7. Dátum narodenia, ak rodné číslo nebolo pridelené'"/>
          <xsl:with-param name="value" select="ns1:Osoba/ns1:DatumNarodenia"/>
          <xsl:with-param name="isDate" select="'true'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'8. Štátna príslušnosť'"/>
          <xsl:with-param name="value" select="ns1:StatnaPrislusnost/ns1:Value"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'9. Doklad totožnosti'"/>
          <xsl:with-param name="value" select="''"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a) Druh dokladu totožnosti'"/>
          <xsl:with-param name="value" select="ns1:TypDokladu/ns1:Value"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'b) Číslo dokladu totožnosti'"/>
          <xsl:with-param name="value" select="ns1:CisloDokladu"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'10. Údaje, ktoré zakladajú postavenie konečného užívateľa výhod'"/>
          <xsl:with-param name="value" select="''"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a) Skutočné ovládanie alebo kontrolovanie právnickej osoby alebo získavanie prospechu z činnosti alebo z obchodu právnickej osoby'"/>
          <xsl:with-param name="value" select="ns1:PostavenieKUV/ns1:APriameOvladaniePO"/>
          <xsl:with-param name="translateBool" select="'true'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a1) Priamy alebo nepriamy podiel na hlasovacích právach v právnickej osobe alebo súčtu týchto podielov v právnickej osobe v rozsahu najmenej 25% (percentuálnych bodov)'"/>
          <xsl:with-param name="value" select="ns1:PostavenieKUV/ns1:A1HlasovaciePrava"/>
          <xsl:with-param name="translateBool" select="'true'"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a2) Priamy alebo nepriamy podiel na základnom imaní právnickej osoby alebo súčtu týchto podielov na základnom imaní právnickej osoby vrátane akcií na doručiteľa v rozsahu najmenej 25% (percentuálnych bodov)'"/>
          <xsl:with-param name="value" select="ns1:PostavenieKUV/ns1:A2ZakladneImanie"/>
          <xsl:with-param name="translateBool" select="'true'"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a3) Právo vymenovať, inak ustanoviť alebo odvolať štatutárny orgán, riadiaci orgán, dozorný orgán alebo kontrolný orgán v právnickej osobe alebo akéhokoľvek ich člena'"/>
          <xsl:with-param name="value" select="ns1:PostavenieKUV/ns1:A3PravoVymenovatRiadiaciOrgan"/>
          <xsl:with-param name="translateBool" select="'true'"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a4) Iný spôsob ovládania právnickej osoby'"/>
          <xsl:with-param name="value" select="ns1:PostavenieKUV/ns1:A4InySposobOvladania"/>
          <xsl:with-param name="translateBool" select="'true'"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a5) Právo na hospodársky prospech z podnikania právnickej osoby alebo inej jej činnosti v rozsahu najmenej 25% (percentuálnych bodov)'"/>
          <xsl:with-param name="value" select="ns1:PostavenieKUV/ns1:A5PravoNaHospProspech"/>
          <xsl:with-param name="translateBool" select="'true'"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'a6) Splnenie aspoň niektorého z kritérií podľa písm. a1) až a5) spoločne s inou osobou konajúcou v zhode s konečným užívateľom výhod alebo ich spoločným postupom'"/>
          <xsl:with-param name="value" select="ns1:PostavenieKUV/ns1:A6KonanieVZhode"/>
          <xsl:with-param name="translateBool" select="'true'"/>
          <xsl:with-param name="bold" select="'false'"/>
          </xsl:call-template>
          <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
          <xsl:with-param name="label" select="'b) Konečný užívateľ výhod - vrcholový manažment'"/>
          <xsl:with-param name="value" select="ns1:PostavenieKUV/ns1:BVrcholovyManazment"/>
          <xsl:with-param name="translateBool" select="'true'"/>
          </xsl:call-template>
        </xsl:for-each>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- TABUĽKA 7: XI Zapisované základné imanie + XII Členský vklad -->
      <fo:block space-after="12pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="9%"/>
        <fo:table-column column-width="37%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-body>
        <xsl:call-template name="zapisovanyUdajHeader"/>
        <!-- XI -->
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
          <fo:block font-weight="bold" text-align="center">XI</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
          <fo:block font-size="8pt" font-weight="bold">Zapisované základné imanie</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2" display-align="center">
          <fo:block font-size="8pt">
            <xsl:call-template name="getValue">
            <xsl:with-param name="value" select="/ns1:FUPD/ns1:ZapisovaneZakladneImanie/ns1:Suma"/>
            </xsl:call-template>
            <xsl:text> </xsl:text>
            <xsl:call-template name="getValue">
            <xsl:with-param name="value" select="/ns1:FUPD/ns1:ZapisovaneZakladneImanie/ns1:Mena/ns1:Znacka"/>
            </xsl:call-template>
          </fo:block>
          </fo:table-cell>
        </fo:table-row>
        <!-- XII -->
        <xsl:for-each select="/ns1:FUPD/ns1:ClenskyVklad">
          <fo:table-row>
          <xsl:if test="position()=1">
            <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
            <fo:block font-weight="bold" text-align="center">XII</fo:block>
            </fo:table-cell>
          </xsl:if>
          <xsl:if test="position()!=1">
            <fo:table-cell border="none" padding="3pt"><fo:block/></fo:table-cell>
          </xsl:if>
          <fo:table-cell border="0.5pt solid black" padding="3pt" display-align="center">
            <fo:block font-size="8pt" font-weight="bold">Výška základného členského vkladu</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2" display-align="center">
            <fo:block font-size="8pt">
            <xsl:call-template name="getValue">
              <xsl:with-param name="value" select="ns1:Suma"/>
            </xsl:call-template>
            <xsl:text> </xsl:text>
            <xsl:call-template name="getValue">
              <xsl:with-param name="value" select="ns1:Mena/ns1:Znacka"/>
            </xsl:call-template>
            <fo:block/>
            <xsl:call-template name="getValue">
              <xsl:with-param name="value" select="ns1:Popis"/>
            </xsl:call-template>
            </fo:block>
          </fo:table-cell>
          </fo:table-row>
        </xsl:for-each>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- TABULKA 8: XIII Splynutie/rozdelenie -->
      <fo:block space-after="12pt">
      <xsl:variable name="SplynutiePORowSpan" select="1 + 2 + (count(/ns1:FUPD/ns1:SplynutiePO) * 11)"/>
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="9%"/>
        <fo:table-column column-width="37%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-column column-width="27%"/>
        <fo:table-body>
        <xsl:call-template name="zapisovanyUdajHeader"/>
        <fo:table-row>
          <fo:table-cell border-left="0.5pt solid black" border-right="0.5pt solid black" border-top="0.5pt solid black" border-bottom="none" padding="3pt" display-align="before">
          <xsl:attribute name="number-rows-spanned"><xsl:value-of select="$SplynutiePORowSpan"/></xsl:attribute>
          <fo:block font-weight="bold" text-align="center">XIII</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt" number-columns-spanned="3">
          <fo:block font-size="8pt" font-weight="bold">Splynutie/rozdelenie</fo:block>
          </fo:table-cell>
        </fo:table-row>
        <!-- Checkbox Splynutie/Rozdelenie: riadok 1 -->
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-rows-spanned="2">
          <fo:block font-size="8pt" font-weight="bold">Družstvo vzniklo v dôsledku</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
          <fo:block font-size="8pt">
            <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
            <xsl:call-template name="compareValuesToCheckField">
              <xsl:with-param name="value1" select="/ns1:FUPD/ns1:SplynutieEnum"/>
              <xsl:with-param name="value2" select="'Splynutie'"/>
            </xsl:call-template>
            </fo:inline>&#160;Splynutia
          </fo:block>
          </fo:table-cell>
        </fo:table-row>
        <!-- Checkbox Splynutie/Rozdelenie: riadok 2 -->
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
          <fo:block font-size="8pt">
            <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
            <xsl:call-template name="compareValuesToCheckField">
              <xsl:with-param name="value1" select="/ns1:FUPD/ns1:SplynutieEnum"/>
              <xsl:with-param name="value2" select="'Rozdelenie'"/>
            </xsl:call-template>
            </fo:inline>&#160;Rozdelenia
          </fo:block>
          </fo:table-cell>
        </fo:table-row>
        <xsl:for-each select="/ns1:FUPD/ns1:SplynutiePO">
            <!-- Zanikajúce rowspan=2 (checkboxy), checkbox Slovenské v col3+col4 -->
            <fo:table-row>
            <fo:table-cell border="0.5pt solid black" padding="2pt" number-rows-spanned="2">
              <fo:block font-size="8pt" font-weight="bold">Zanikajúce družstvo (družstvá)</fo:block>
            </fo:table-cell>
            <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
              <fo:block font-size="8pt">
              <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
                <xsl:call-template name="compareValuesToCheckField">
                <xsl:with-param name="value1" select="@slovZahrEnum"/>
                <xsl:with-param name="value2" select="'Slovenska'"/>
                </xsl:call-template>
              </fo:inline>&#160;Slovenské zanikajúce družstvo (družstvá)
              </fo:block>
            </fo:table-cell>
            </fo:table-row>
            <!-- Checkbox Zahraničné: col3+col4 -->
            <fo:table-row>
            <fo:table-cell border="0.5pt solid black" padding="2pt" number-columns-spanned="2">
              <fo:block font-size="8pt">
              <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
                <xsl:call-template name="compareValuesToCheckField">
                <xsl:with-param name="value1" select="@slovZahrEnum"/>
                <xsl:with-param name="value2" select="'Zahranicna'"/>
                </xsl:call-template>
              </fo:inline>&#160;Zahraničné zanikajúce družstvo (družstvá)
              </fo:block>
            </fo:table-cell>
            </fo:table-row>
            <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'1. Obchodné meno'"/>
            <xsl:with-param name="value" select="ns1:ObchodneMeno"/>
            </xsl:call-template>
            <xsl:call-template name="subheaderRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="text" select="'2. Sídlo'"/>
            </xsl:call-template>
            <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'a) Názov ulice/verejného priestranstva'"/>
            <xsl:with-param name="value" select="ns1:Adresa/ns1:Ulica"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
            </xsl:call-template>
            <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'b) Súpisné/orientačné číslo'"/>
            <xsl:with-param name="value" select="ns1:Adresa/ns1:Cislo"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
            </xsl:call-template>
            <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'c) Názov obce'"/>
            <xsl:with-param name="value" select="ns1:Adresa/ns1:Obec/ns1:Value"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
            </xsl:call-template>
            <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'d) PSČ'"/>
            <xsl:with-param name="value" select="ns1:Adresa/ns1:Psc"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
            </xsl:call-template>
            <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'e) Štát'"/>
            <xsl:with-param name="value" select="ns1:Adresa/ns1:Stat/ns1:Value"/>
            <xsl:with-param name="bold" select="'false'"/>
            <xsl:with-param name="paddingStart" select="'10pt'"/>
            </xsl:call-template>
            <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'3. IČO (pridelené v SR)'"/>
            <xsl:with-param name="value" select="ns1:Ico"/>
            </xsl:call-template>
            <xsl:call-template name="tableRow"><xsl:with-param name="skipFirstCol" select="'true'"/>
            <xsl:with-param name="label" select="'4. Iné identifikačné číslo'"/>
            <xsl:with-param name="value" select="ns1:InyIdentifikacnyUdaj"/>
            </xsl:call-template>
          </xsl:for-each>
          </fo:table-body>
          </fo:table>
        </fo:block>

      <!-- ===== Záverečné bloky ===== -->

      <!-- ZapisatK — 3-stĺpcová tabuľka -->
      <fo:block space-before="18pt" space-after="12pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="10%"/>
        <fo:table-column column-width="80%"/>
        <fo:table-column column-width="10%"/>
        <fo:table-body>
        <fo:table-row>
          <fo:table-cell><fo:block/></fo:table-cell>
          <fo:table-cell padding-top="15pt" padding-bottom="15pt" padding-left="5pt" padding-right="5pt" text-align="center">
          <fo:block font-size="8pt" font-weight="bold">
            <fo:inline>Údaje obsiahnuté v tomto návrhu na prvozápis družstva
            do obchodného registra navrhujem (navrhujeme) zapísať k&#160;</fo:inline>
            <fo:inline border-bottom="0.5pt solid black" padding="1pt">
            <xsl:call-template name="formatDate"><xsl:with-param name="DateTime" select="/ns1:FUPD/ns1:ZapisatK"/><xsl:with-param name="OutputFormat" select="'d.m.Y'"/></xsl:call-template>
            <fo:leader leader-pattern="space" leader-length="20pt"/>
            </fo:inline>
            <fo:inline>.</fo:inline>
          </fo:block>
          </fo:table-cell>
          <fo:table-cell><fo:block/></fo:table-cell>
        </fo:table-row>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- DobaUrcita — 3-stĺpcová tabuľka -->
      <fo:block space-before="12pt" space-after="12pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="10%"/>
        <fo:table-column column-width="80%"/>
        <fo:table-column column-width="10%"/>
        <fo:table-body>
        <fo:table-row>
          <fo:table-cell><fo:block/></fo:table-cell>
          <fo:table-cell padding-top="15pt" padding-bottom="15pt" padding-left="5pt" padding-right="5pt" text-align="center">
          <fo:block font-size="8pt" font-weight="bold">
            <fo:inline>Družstvo sa zakladá na dobu určitú&#160;áno&#160;</fo:inline>
            <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
            <xsl:if test="/ns1:FUPD/ns1:DobaUrcita/ns1:JeDobaUrcita = 'true'">X</xsl:if>
            <xsl:if test="not(/ns1:FUPD/ns1:DobaUrcita/ns1:JeDobaUrcita = 'true')"><fo:inline color="white">X</fo:inline></xsl:if>
            </fo:inline>
            <fo:inline>&#160;nie&#160;</fo:inline>
            <fo:inline border="0.5pt solid black" padding="1pt 4pt" font-size="6pt">
            <xsl:if test="/ns1:FUPD/ns1:DobaUrcita/ns1:JeDobaUrcita = 'false'">X</xsl:if>
            <xsl:if test="not(/ns1:FUPD/ns1:DobaUrcita/ns1:JeDobaUrcita = 'false')"><fo:inline color="white">X</fo:inline></xsl:if>
            </fo:inline>
            <fo:block font-size="8pt" font-weight="bold" space-before="6pt">
            Ak sa družstvo zakladá na dobu určitú, dátum uplynutia času, na ktorý sa zakladá&#160;
            <fo:inline border-bottom="0.5pt solid black" padding="1pt">
              <xsl:call-template name="formatDate"><xsl:with-param name="DateTime" select="/ns1:FUPD/ns1:DobaUrcita/ns1:Datum"/><xsl:with-param name="OutputFormat" select="'d.m.Y'"/></xsl:call-template>
            </fo:inline>
            </fo:block>
          </fo:block>
          </fo:table-cell>
          <fo:table-cell><fo:block/></fo:table-cell>
        </fo:table-row>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- Prílohy -->
      <fo:block space-before="16pt" space-after="8pt">
      <fo:block font-size="9pt" font-weight="bold">ZÁPISOVÉ PODKLADY (PRÍLOHY) K NÁVRHU NA PRVOZÁPIS DRUŽSTVA DO OBCHODNÉHO REGISTRA:</fo:block>
      </fo:block>
      <fo:block space-after="8pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="30%"/>
        <fo:table-column column-width="70%"/>
        <fo:table-header>
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="3pt">
          <fo:block font-size="8pt" font-weight="bold">Poradové číslo</fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="3pt">
          <fo:block font-size="8pt" font-weight="bold">Názov zápisového podkladu (prílohy)</fo:block>
          </fo:table-cell>
        </fo:table-row>
        </fo:table-header>
        <fo:table-body>
        <xsl:for-each select="/ns1:FUPD/ns1:PrilohyKNavrhu">
          <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:poradoveCislo"/></xsl:call-template></fo:block>
          </fo:table-cell>
          <fo:table-cell border="0.5pt solid black" padding="2pt">
            <fo:block font-size="8pt"><xsl:call-template name="getValue"><xsl:with-param name="value" select="ns1:Nazov"/></xsl:call-template></fo:block>
          </fo:table-cell>
          </fo:table-row>
        </xsl:for-each>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- Vyhlásenie — 3-stĺpcová tabuľka -->
      <fo:block space-before="18pt" space-after="12pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="10%"/>
        <fo:table-column column-width="80%"/>
        <fo:table-column column-width="10%"/>
        <fo:table-body>
        <fo:table-row>
          <fo:table-cell><fo:block/></fo:table-cell>
          <fo:table-cell padding-top="15pt" padding-bottom="15pt" padding-left="5pt" padding-right="5pt" text-align="center">
          <fo:block font-size="8pt" font-weight="bold">Vyhlasujem (vyhlasujeme), že všetky údaje uvedené v tomto návrhu na prvozápis družstva do obchodného registra a všetky zápisové podklady (prílohy) priložené k návrhu na zápis sú správne a úplné.</fo:block>
          </fo:table-cell>
          <fo:table-cell><fo:block/></fo:table-cell>
        </fo:table-row>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- Družstvo (Spoločnosť) — tabuľka s hlavičkou -->
      <fo:block space-before="12pt" space-after="8pt">
      <fo:table table-layout="fixed" width="100%" border="2pt solid black">
        <fo:table-column column-width="100%"/>
        <fo:table-header>
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="3pt">
          <fo:block font-size="8pt" font-weight="bold">Družstvo</fo:block>
          </fo:table-cell>
        </fo:table-row>
        </fo:table-header>
        <fo:table-body>
        <fo:table-row>
          <fo:table-cell border="0.5pt solid black" padding="15pt">
          <fo:block font-size="8pt">
            <xsl:call-template name="getValue">
            <xsl:with-param name="value" select="/ns1:FUPD/ns1:Spolocnost"/>
            </xsl:call-template>
          </fo:block>
          </fo:table-cell>
        </fo:table-row>
        </fo:table-body>
      </fo:table>
      </fo:block>

      <!-- V dňa -->
      <fo:block space-before="8pt" space-after="8pt" font-size="8pt">
      <fo:inline>V </fo:inline>
      <fo:inline border-bottom="0.5pt solid black" padding="1pt">
        <xsl:call-template name="getValue"><xsl:with-param name="value" select="/ns1:FUPD/ns1:V"/></xsl:call-template>
        <fo:leader leader-pattern="space" leader-length="60pt"/>
      </fo:inline>
      <fo:inline> dňa </fo:inline>
      <fo:inline border-bottom="0.5pt solid black" padding="1pt">
        <xsl:call-template name="formatDate"><xsl:with-param name="DateTime" select="/ns1:FUPD/ns1:Dna"/><xsl:with-param name="OutputFormat" select="'d'"/></xsl:call-template>
      </fo:inline>
      <xsl:text>.</xsl:text>
      <fo:inline border-bottom="0.5pt solid black" padding="1pt">
        <xsl:call-template name="formatDate"><xsl:with-param name="DateTime" select="/ns1:FUPD/ns1:Dna"/><xsl:with-param name="OutputFormat" select="'m'"/></xsl:call-template>
      </fo:inline>
      <xsl:text>.</xsl:text>
      <fo:inline border-bottom="0.5pt solid black" padding="1pt">
        <xsl:call-template name="formatDate"><xsl:with-param name="DateTime" select="/ns1:FUPD/ns1:Dna"/><xsl:with-param name="OutputFormat" select="'Y'"/></xsl:call-template>
      </fo:inline>
      </fo:block>

      <fo:block id="last-page"/>

    </fo:flow>
    </fo:page-sequence>
  </fo:root>
  </xsl:template>

</xsl:stylesheet>
