<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:egonp="http://schemas.gov.sk/form/30416094.PRIHLASKA_NA_SKUSKU_ADR_OS_VODIC.sk/2.0">
<xsl:output method="text" indent="yes" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*" />
<xsl:template match="/egonp:RegistrationsForExamsADRDriver">
<xsl:text>Prihlaska_na_skusku_ADR_OS_vodic</xsl:text>
<xsl:apply-templates select="./egonp:TrainingOrganization/egonp:Codelist[egonp:CodelistCode='JISCD0070']/egonp:CodelistItem/egonp:ItemCode"/>
<xsl:apply-templates select="./egonp:TrainingOrganization/egonp:Codelist[egonp:CodelistCode='JISCD0070']/egonp:CodelistItem/egonp:ItemName[@Language='sk']"/>
<xsl:apply-templates select="./egonp:Applicant"/>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:PersonName/egonp:Affix[@type='qualification' and @position='prefix']">
<xsl:apply-templates select="./egonp:Codelist[egonp:CodelistCode='CL000062']/egonp:CodelistItem/egonp:ItemCode"/>
<xsl:apply-templates select="./egonp:Codelist[egonp:CodelistCode='CL000062']/egonp:CodelistItem/egonp:ItemName[@Language='sk']"/>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:PersonName/egonp:Affix[@type='qualification' and @position='postfix']">
<xsl:apply-templates select="./egonp:Codelist[egonp:CodelistCode='CL000063']/egonp:CodelistItem/egonp:ItemCode"/>
<xsl:apply-templates select="./egonp:Codelist[egonp:CodelistCode='CL000063']/egonp:CodelistItem/egonp:ItemName[@Language='sk']"/>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:TelephoneAddress">
<xsl:apply-templates select="./egonp:TelephoneType/egonp:Codelist[egonp:CodelistCode='12']/egonp:CodelistItem/egonp:ItemCode"/>
<xsl:apply-templates select="./egonp:TelephoneType/egonp:Codelist[egonp:CodelistCode='12']/egonp:CodelistItem/egonp:ItemName[@Language='sk']"/>
<xsl:apply-templates select="./egonp:Number/egonp:FormattedNumber"/>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress">
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:Country/egonp:Codelist[egonp:CodelistCode='CL000086']/egonp:CodelistItem/egonp:ItemCode"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:Country/egonp:Codelist[egonp:CodelistCode='CL000086']/egonp:CodelistItem/egonp:ItemName[@Language='sk']"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:Region/egonp:NonCodelistData"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:Region/egonp:Codelist[egonp:CodelistCode='CL000023']/egonp:CodelistItem/egonp:ItemCode"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:Region/egonp:Codelist[egonp:CodelistCode='CL000023']/egonp:CodelistItem/egonp:ItemName[@Language='sk']"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:County/egonp:NonCodelistData"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:County/egonp:Codelist[egonp:CodelistCode='CL000024']/egonp:CodelistItem/egonp:ItemCode"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:County/egonp:Codelist[egonp:CodelistCode='CL000024']/egonp:CodelistItem/egonp:ItemName[@Language='sk']"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:Municipality/egonp:NonCodelistData"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:Municipality/egonp:Codelist[egonp:CodelistCode='CL000025']/egonp:CodelistItem/egonp:ItemCode"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:Municipality/egonp:Codelist[egonp:CodelistCode='CL000025']/egonp:CodelistItem/egonp:ItemName[@Language='sk']"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:StreetName"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:BuildingNumber"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:PropertyRegistrationNumber"/>
<xsl:apply-templates select="./egonp:PhysicalAddress/egonp:DeliveryAddress/egonp:PostalCode"/>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:TrainingOrganization/egonp:Codelist[egonp:CodelistCode='JISCD0070']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Školiaca organiz&#225;cia: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:TrainingOrganization/egonp:Codelist[egonp:CodelistCode='JISCD0070']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Školiaca organiz&#225;cia hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:PersonName/egonp:GivenName">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Meno: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:PersonName/egonp:FamilyName">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Priezvisko: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:PersonName/egonp:Affix[@type='qualification' and @position='prefix']/egonp:Codelist[egonp:CodelistCode='CL000062']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Titul pred menom: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:PersonName/egonp:Affix[@type='qualification' and @position='prefix']/egonp:Codelist[egonp:CodelistCode='CL000062']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Titul pred menom hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:PersonName/egonp:Affix[@type='qualification' and @position='postfix']/egonp:Codelist[egonp:CodelistCode='CL000063']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Titul za menom: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:PersonName/egonp:Affix[@type='qualification' and @position='postfix']/egonp:Codelist[egonp:CodelistCode='CL000063']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Titul za menom hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:Birth/egonp:DateOfBirth">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>D&#225;tum narodenia: </xsl:text><xsl:call-template name="formatToSkDate"><xsl:with-param name="date" select="." /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:Birth/egonp:PlaceOfBirth/egonp:PhysicalAddress/egonp:Municipality/egonp:NonCodelistData">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Miesto narodenia: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:Birth/egonp:PlaceOfBirth/egonp:PhysicalAddress/egonp:Municipality/egonp:Codelist[egonp:CodelistCode='CL000025']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Miesto narodenia hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:Birth/egonp:PlaceOfBirth/egonp:PhysicalAddress/egonp:Municipality/egonp:Codelist[egonp:CodelistCode='CL000025']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Miesto narodenia: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:Citizenship/egonp:Codelist[egonp:CodelistCode='CL000086']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Št&#225;tne občianstvo hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalPerson/egonp:Citizenship/egonp:Codelist[egonp:CodelistCode='CL000086']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Št&#225;tne občianstvo: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:Country/egonp:Codelist[egonp:CodelistCode='CL000086']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Št&#225;t: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:Country/egonp:Codelist[egonp:CodelistCode='CL000086']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Št&#225;t hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:Region/egonp:NonCodelistData">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Kraj: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:Region/egonp:Codelist[egonp:CodelistCode='CL000023']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Kraj: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:Region/egonp:Codelist[egonp:CodelistCode='CL000023']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Kraj hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:County/egonp:NonCodelistData">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Okres: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:County/egonp:Codelist[egonp:CodelistCode='CL000024']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Okres: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:County/egonp:Codelist[egonp:CodelistCode='CL000024']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Okres hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:Municipality/egonp:NonCodelistData">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Obec: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:Municipality/egonp:Codelist[egonp:CodelistCode='CL000025']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Obec: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:Municipality/egonp:Codelist[egonp:CodelistCode='CL000025']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Obec hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:StreetName">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Ulica: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:BuildingNumber">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>S&#250;pisn&#233; / orientačn&#233; č&#237;slo: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:PropertyRegistrationNumber">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Orientačn&#233; č&#237;slo: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:PhysicalAddress/egonp:DeliveryAddress/egonp:PostalCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>PSČ: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:TelephoneAddress/egonp:TelephoneType/egonp:Codelist[egonp:CodelistCode='12']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Typ telef&#243;nu: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:TelephoneAddress/egonp:TelephoneType/egonp:Codelist[egonp:CodelistCode='12']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Typ telef&#243;nu hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:TelephoneAddress/egonp:Number/egonp:FormattedNumber">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Č&#237;slo: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:InternetAddress[contains(egonp:Address,'@')]/egonp:Address">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>E-mail: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:InternetAddress[not(contains(egonp:Address,'@'))]/egonp:Address">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Web: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:Country/egonp:Codelist[egonp:CodelistCode='CL000086']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Št&#225;t: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:Country/egonp:Codelist[egonp:CodelistCode='CL000086']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Št&#225;t hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:Region/egonp:NonCodelistData">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Kraj: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:Region/egonp:Codelist[egonp:CodelistCode='CL000023']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Kraj: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:Region/egonp:Codelist[egonp:CodelistCode='CL000023']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Kraj hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:County/egonp:NonCodelistData">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Okres: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:County/egonp:Codelist[egonp:CodelistCode='CL000024']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Okres: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:County/egonp:Codelist[egonp:CodelistCode='CL000024']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Okres hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:Municipality/egonp:NonCodelistData">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Obec: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:Municipality/egonp:Codelist[egonp:CodelistCode='CL000025']/egonp:CodelistItem/egonp:ItemCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Obec: </xsl:text><xsl:value-of select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:Municipality/egonp:Codelist[egonp:CodelistCode='CL000025']/egonp:CodelistItem/egonp:ItemName[@Language='sk']">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Obec hodnota: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:StreetName">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Ulica: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:BuildingNumber">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>S&#250;pisn&#233; / orientačn&#233; č&#237;slo: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:PropertyRegistrationNumber">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>Orientačn&#233; č&#237;slo: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="/egonp:RegistrationsForExamsADRDriver/egonp:Applicant/egonp:PersonData/egonp:MailingAddress/egonp:PhysicalAddress/egonp:DeliveryAddress/egonp:PostalCode">
<xsl:if test="./text()">
<xsl:text>&#xA;</xsl:text>
<xsl:text>&#09;</xsl:text><xsl:text>PSČ: </xsl:text><xsl:call-template name="string-replace-all"><xsl:with-param name="text" select="." /><xsl:with-param name="replace" select="'&#10;'" /><xsl:with-param name="by" select="'&#13;&#10;&#09;'" /></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="formatToSkDate">
<xsl:param name="date" />
<xsl:variable name="dateString" select="string($date)" />
<xsl:choose>
<xsl:when test="$dateString != '' and string-length($dateString)=10 and string(number(substring($dateString, 1, 4))) != 'NaN' ">
<xsl:value-of select="concat(substring($dateString, 9, 2), '.', substring($dateString, 6, 2), '.', substring($dateString, 1, 4))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$dateString"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="booleanCheckboxToString">
<xsl:param name="boolValue" />
<xsl:variable name="boolValueString" select="string($boolValue)" />
<xsl:choose>
<xsl:when test="$boolValueString = 'true' ">
<xsl:text>Áno</xsl:text>
</xsl:when>
<xsl:when test="$boolValueString = 'false' ">
<xsl:text>Nie</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$boolValueString"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="formatTimeTrimMinutes">
<xsl:param name="time" />
<xsl:variable name="timeString" select="string($time)" />
<xsl:if test="$timeString != ''">
<xsl:value-of select="substring($timeString, 1, 5)" />
</xsl:if>
</xsl:template>
<xsl:template name="string-replace-all">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="by"/>
<xsl:choose>
<xsl:when test="contains($text, $replace)">
<xsl:value-of select="substring-before($text,$replace)"/>
<xsl:value-of select="$by"/>
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="by" select="$by" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="formatToSkDateTime">
<xsl:param name="dateTime" />
<xsl:variable name="dateSubstring" select="substring($dateTime, 1, 10)" />
<xsl:variable name="timeSubstring" select="substring($dateTime, 12, 8)" />
<xsl:variable name="dateString">
<xsl:choose>
<xsl:when test="$dateSubstring != '' and string-length($dateSubstring)=10 and string(number(substring($dateSubstring, 1, 4))) != 'NaN' ">
<xsl:value-of select="concat(substring($dateSubstring, 9, 2), '.', substring($dateSubstring, 6, 2), '.', substring($dateSubstring, 1, 4))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$dateSubstring"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="timeString">
<xsl:if test="$timeSubstring != ''">
<xsl:value-of select="substring($timeSubstring, 1, 5)" />
</xsl:if>
</xsl:variable>
<xsl:value-of select="concat($dateString,' ',$timeString)"/>
</xsl:template>
</xsl:stylesheet>

