View stylesheet

XML schema http://dd.eionet.europa.eu/schemas/eu-ets-article21/Article21Questionnaire.xsd
Output type HTML
Description Print Preview
XSL file article21-html-conversion.xsl (Last modified: 29 Apr 2015 15:48 )
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                version="2.0">
    <xsl:output method="html" indent="yes"
                doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
                doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
                omit-xml-declaration="yes" encoding="utf-8"/>
    <xsl:variable name="labelsLanguage" select="Article21Questionnaire/@labelLanguage"/>

    <xsl:variable name="xmlPath" select="'https://svn.eionet.europa.eu/repositories/Reportnet/Dataflows/EmissionTradingArticle21/xml/languages/'"/>
    <xsl:variable name="codelistsUrl">
        <xsl:choose>
            <xsl:when test="doc-available(concat($xmlPath, 'art21-codelists-', $labelsLanguage ,'.xml'))">
                <xsl:value-of select="concat($xmlPath, 'art21-codelists-', $labelsLanguage ,'.xml')"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="concat($xmlPath, 'art21-codelists-en.xml')"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:variable>
    <xsl:variable name="codelists" select="document($codelistsUrl)/Article21Codelists"/>

    <xsl:variable name="labelsUrl">
        <xsl:choose>
            <xsl:when test="doc-available(concat($xmlPath, 'art21-labels-', $labelsLanguage ,'.xml'))">
                <xsl:value-of select="concat($xmlPath, 'art21-labels-', $labelsLanguage ,'.xml')"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="concat($xmlPath, '../article21-labels.xml')"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:variable>
    <xsl:variable name="labels" select="document($labelsUrl)/labels"/>
<!--
    <xsl:variable name="labels" select="document('http://converterstest.eionet.europa.eu/xmlfile/article21-labels.xml')/labels"/>
-->
    <xsl:variable name="schema" select="document('http://dd.eionet.europa.eu/schemas/eu-ets-article21/Article21Questionnaire.xsd')/xs:schema"/>

<!-- parameters for testing at localhost -->

       <!-- <xsl:variable name="codelists" select="document('../xml/languages/art21-codelists-en.xml')/Article21Codelists"/>
        <xsl:variable name="schema" select="document('../schema/Article21Questionnaire.xsd')/xs:schema"/>
        <xsl:variable name="labels" select="document('../xml/article21-labels.xml')/labels"/>
        -->
        <xsl:template match="/">
            <html xmlns="http://www.w3.org/1999/xhtml">
                <xsl:attribute name="lang" select="/Article21Questionnaire/@xml:lang"/>
                <head>
                    <title>EU-ETS Article 21 questionnaire</title>
                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
                    <style type="text/css">
                        body {
                            font-size: 80%;
                            font-family: verdana, helvetica, arial, sans-serif;
                            color: #333;
                            margin-left:30px;
                        }
                        h1 {
                            font-size: 160%;
                            color: #315076;
                            text-align: center;
                            padding-bottom: 0.5em;
                            font-style: italic;
                        }
                        h2 {
                            font-size: 130%;
                            border-bottom: 1px solid #999999;
                            font-style: italic;
                            margin-left:-25px;
                        }
                        h3{
                            font-size: 110%;
                            color: #315076;
                            margin-left:-25px;
                        }
                        h4{
                            font-size: 110%;
                            color: #315076;
                            margin-top: 10px;
                            margin-bottom: 5px;
                        }
                        caption {
                            display: none;
                            font-family: vardana, verdana, helvetica, arial, sans-serif;
                            text-align: left;
                            font-size: 150%;
                        }

                        table {
                            border-collapse: collapse;
                        }
                        th, td{
                            padding: 0.5em 0.5em 0.5em 0.5em;
                            text-align:left;
                            border: 1px solid #bbb;
                            vertical-align: top;
                        }
                        th {
                           background-color: #f9f8f6;
                        }
                        table.datatable {
                            width: 100%;
                        }

                        table.question{
                            margin-top: 13px;
                        }
                        table.question th, table.question td{
                            vertical-align: top;
                            border: none;
                        }
                        table.question th{
                            font-size: 105%;
                            color: #315076;
                            background-color: transparent;
                            padding-left: 0;
                        }
                        table.second{
                            margin-top: 5px;
                        }
                        .sub {
                            font-size: 0.8em;
                        }

                        sup {
                            font-size: 0.8em;
                            font-style: italic;
                            color: #777;
                        }
                        .note{
                            font-size: 0.8em;
                            color: #315076;
                        }
                        .value {
                            background-color: #ffffe0;
                        }
                        .disabled td{
                            background-color:lightgrey;
                        }
                        .italicTableHeading{
                            font-style: italic;
                            color: black;
                            margin-left: 1em;
                        }
                        #S06_ApplicationInformationExchangeRequirements1 th.th-1{
                            width: 50%;
                        }
                        #S06_ApplicationInformationExchangeRequirements2 th.th-1{
                            width: 50%;
                        }
                        #S06_ApplicationInformationExchangeRequirements3 th.th-1{
                            width: 50%;
                        }
                        #S06_ApplicationInformationExchangeRequirements4 th.th-1{
                            width: 50%;
                        }
                        #S06_InstallationsVerificationReportChecksDetail1 td.td-1{
                            width: 80%;
                        }
                        #S06_InstallationsVerificationReportChecksDetail2 td.td-1{
                            width: 80%;
                        }
                        #S06_InstallationsVerificationReportChecksDetail3 td.td-1{
                            width: 80%;
                        }
                        #InstallationsVisitsWaivedLowEmittersDetail td.td-1{
                            width: 80%;
                        }
                        #S06_AircraftOperatorsVerificationEmissionReportChecks1 td.td-1{
                            width: 80%;
                        }
                        #S06_AircraftOperatorsVerificationEmissionReportChecks2 td.td-1{
                            width: 80%;
                        }
                        #S06_AircraftOperatorsVerificationEmissionReportChecks3 td.td-1{
                            width: 80%;
                        }
                        #S06_AircraftOperatorsVerificationEmissionReportChecks1 td.td-2{
                            width: 10%;
                        }
                        #S06_AircraftOperatorsVerificationEmissionReportChecks2 td.td-2{
                            width: 10%;
                        }
                        #S06_AircraftOperatorsVerificationTKMReportChecks1 td.td-1{
                            width: 80%;
                        }
                        #S06_AircraftOperatorsVerificationTKMReportChecks2 td.td-1{
                            width: 80%;
                        }
                        #S06_AircraftOperatorsVerificationTKMReportChecks3 td.td-1{
                            width: 80%;
                        }
                        #S06_AircraftOperatorsVerificationTKMReportChecks1 td.td-2{
                            width: 10%;
                        }
                        #S06_AircraftOperatorsVerificationTKMReportChecks2 td.td-2{
                            width: 10%;
                        }
                        #AircraftOperatorsVisitsWaivedLowEmittersDetail td.td-1{
                            width: 80%;
                        }
                        #S10_InstallationOperatorFeesPermits th.th-1{
                            width: 50%;
                        }
                        #S10_InstallationOperatorFeesAnnualSubsistence th.th-1{
                            width: 50%;
                        }
                        #S10_AircraftOperatorFeesMonitoringPlans th.th-1{
                            width: 50%;
                        }
                        #S10_AircraftOperatorFeesSubsistence th.th-1{
                            width: 50%;
                        }
                        #S11_InstallationsInfringementPenalties th.th-1{
                            width: 30%;
                        }
                        #S11_InstallationsInfringementPenalties th.th-1{
                            width: 30%;
                        }
                        #S11_AircraftInfringementPenalties th.th-1{
                            width: 30%;
                        }
                        #S11_AircraftPenaltiesImposed th.th-1{
                            width: 30%;
                        }
                    </style>

                </head>
                <body>
                    <h1><xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="'Questionnaire-title'"/></xsl:call-template>
                    </h1>
                    <table>
                        <tr>
                            <th>Reporting language</th>
                            <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="/Article21Questionnaire/@xml:lang"/></xsl:call-template>
                        </tr>
                        <tr>
                            <th>Reporting year</th>
                            <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="/Article21Questionnaire/@year"/></xsl:call-template>
                        </tr>
                        <tr>
                            <td colspan="2" class="value">
                                <xsl:choose>
                                    <xsl:when test="/Article21Questionnaire/@officialReport = 'yes'">This is the official report</xsl:when>
                                    <xsl:when test="/Article21Questionnaire/@officialReport = 'no'">This is the translation of the official report</xsl:when>
                                </xsl:choose>
                            </td>
                        </tr>
                    </table>
                    <xsl:apply-templates />
                </body>
            </html>
        </xsl:template>
        <xsl:template match="Q_1_1">
            <h2>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S01_InstitutionDetails'"/>
                </xsl:call-template>
            </h2>
            <table>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S01_InstitutionDetails-department'"/>
                        </xsl:call-template>
                    </th>
                    <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="S01_InstitutionDetails/NameAndDepartment"/></xsl:call-template>
                </tr>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S01_InstitutionDetails-contact'"/>
                        </xsl:call-template>
                    </th>
                    <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="S01_InstitutionDetails/ContactPersonName"/></xsl:call-template>
                </tr>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S01_InstitutionDetails-job-title'"/>
                        </xsl:call-template>
                    </th>
                    <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="S01_InstitutionDetails/ContactPersonJobTitle"/></xsl:call-template>
                </tr>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S01_InstitutionDetails-address'"/>
                        </xsl:call-template>
                    </th>
                    <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="S01_InstitutionDetails/Address"/></xsl:call-template>
                </tr>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S01_InstitutionDetails-telephone'"/>
                        </xsl:call-template>
                    </th>
                    <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="S01_InstitutionDetails/InternationalTelephoneNumber"/></xsl:call-template>
                </tr>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S01_InstitutionDetails-e-mail'"/>
                        </xsl:call-template>
                    </th>
                    <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="S01_InstitutionDetails/EMail"/></xsl:call-template>
                </tr>
            </table>
        </xsl:template>

    <xsl:template match="Q_2_1">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'Q_2'"/>
            </xsl:call-template>
        </h2>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_CompetentAuthority-note'"/>
            </xsl:call-template>
        </div>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_CompetentAuthority'"/>
            </xsl:call-template>
        </h3>
        <xsl:apply-templates select="S02_CompetentAuthority"/>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'Q_2-comment'"/>
            </xsl:call-template>
        </div>
        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_AccreditationBody'"/>
            </xsl:call-template>
        </h4>
        <xsl:apply-templates select="S02_AccreditationBody"/>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'Q_2-comment'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_AccreditationBody-comment'"/>
            </xsl:call-template>
        </div>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="CertificationBodySetUp"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S02_CertificationAuthExists'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S02_CertificationAuthExistsDetails"/>
            <xsl:with-param
                    name="relevantLabel" select="'S02_CertificationAuthExistsDetails'">
            </xsl:with-param>
            <xsl:with-param name="comment" select="'S02_CertificationAuthExists-comment'"/>

        </xsl:call-template>

        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_RegistryAdministrator'"/>
            </xsl:call-template>
        </h4>
        <xsl:apply-templates select="S02_RegistryAdministrator"/>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'Q_2-comment'"/>
            </xsl:call-template>
        </div>
    </xsl:template>

    <xsl:template match="S02_CompetentAuthority|S02_AccreditationBody|S02_CertificationAuthExistsDetails|S02_RegistryAdministrator">
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="''"/>
            <xsl:with-param name="curElem" select="."/>
        </xsl:call-template>
    </xsl:template>

    <xsl:template match="Q_2_2/S02_CompetentAuthorityRoles">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_CompetentAuthorityRoles'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'Competent-authority|Installations|Aviation'"/>
            <xsl:with-param name="otherPleaseSpecify" select="'Other_please_specify'"/>
        </xsl:call-template>

        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_CompetentAuthorityRoles-comment-1'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_CompetentAuthorityRoles-comment-2'"/>
            </xsl:call-template>
        </div>
    </xsl:template>

    <xsl:template match="Q_2_3">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_CAFocalPoint'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S02_CAFocalPoint-CAArt69_2|Abbreviation'"/>
            <xsl:with-param name="curElem" select="."/>
        </xsl:call-template>
        <xsl:apply-templates select="S02_CompetentAuthorityCoordination"/>
    </xsl:template>

    <xsl:template match="S02_CompetentAuthorityCoordination">
        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_CompetentAuthorityCoordination'"/>
            </xsl:call-template>
        </h4>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S02_CompetentAuthorityCoordination-CACoordinationTaskCode|S03_ActivityPermits-ActivityPermitsIssued|comments'"/>
            <xsl:with-param name="otherPleaseSpecify" select="'other_coordination_activities'"/>
        </xsl:call-template>
    </xsl:template>

    <xsl:template match="Q_2_4/S02_InformationExchangeAccBodyAndCA">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S02_InformationExchangeAccBodyAndCA'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S02_InformationExchangeAccBodyAndCA-InformationExchangeCode|S03_ActivityPermits-ActivityPermitsIssued|comments'"/>
            <xsl:with-param name="otherPleaseSpecify" select="'other_coordination_activities'"/>
        </xsl:call-template>
    </xsl:template>

    <xsl:template match="Q_3_1">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-3'"/>
            </xsl:call-template>
        </h2>
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-3a'"/>
            </xsl:call-template>
        </h2>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S03_EmittingInstallations'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'Installations|S03_EmittingInstallations-NumberOfInstallations'"/>
            <xsl:with-param name="curElem" select="S03_EmittingInstallations"/>
        </xsl:call-template>
        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S03_ActivityPermits'"/>
            </xsl:call-template>
        </h4>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S03_ActivityPermits-Annex1Activities|S03_ActivityPermits-ActivityPermitsIssued'"/>
            <xsl:with-param name="curElem" select="S03_ActivityPermits"/>
        </xsl:call-template>
    </xsl:template>

    <xsl:template match="Q_3_2">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationsExcludedArt27"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S03_InstallationsExcludedArt27'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="relevantElem" select="S03_InstallationsExcludedArt27Detail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S03_InstallationsExcludedArt27Detail'">
            </xsl:with-param>
            <xsl:with-param name="relevantElemTableHeader" select="'S03_InstallationsExcludedArt27Detail-ExcludedAnnex1Activity|S03_InstallationsExcludedArt27Detail-InstallationsExcludedEmissions|S03_InstallationsExcludedArt27Detail-InstallationsExceededThreshold'"/>
        </xsl:call-template>
        <xsl:call-template name="getTwoRowTable">
            <xsl:with-param name="elem" select="VerificationMeasuresArt27"/>
            <xsl:with-param name="label" select="'S03_VerificationMeasuresArt27'"/>
        </xsl:call-template>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="SmallEmissionsSimplifiedRequirements"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S03_SmallEmissionsSimplifiedRequirements'">
            </xsl:with-param>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="SmallEmissionsSimplifiedRequirementsDetail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S03_SmallEmissionsSimplifiedRequirementsDetail'"></xsl:with-param>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_3_3">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-3b'"/>
            </xsl:call-template>
        </h2>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S03_AircraftAnnex1Activities'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S03_AircraftAnnex1Activities-AircraftOperatorType|S03_AircraftAnnex1Activities-NumberOfAircraftOperators'"/>
            <xsl:with-param name="curElem" select="S03_AircraftAnnex1Activities"/>
        </xsl:call-template>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="AdditionalAircraftOperators"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S03_AdditionalAircraftOperators'">
            </xsl:with-param>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="NumberOfAdditionalAircraftOperators"/>
            <xsl:with-param
                    name="relevantLabel" select="'S03_AdditionalAircraftOperatorsDetail'">

            </xsl:with-param>
            <xsl:with-param name="relevantElemTableHeader" select="'S03_AdditionalAircraftOperatorsDetail-NumberOfAdditionalAircraftOperators'">
            </xsl:with-param>
        </xsl:call-template>

        <xsl:call-template name="getTwoRowTable">
            <xsl:with-param name="elem" select="AdditionalAircraftOperatorsIssuesToRaise"/>
            <xsl:with-param name="label" select="'S03_AdditionalAircraftOperatorsDetailIssue'"/>
        </xsl:call-template>
    </xsl:template>

    <xsl:template match="Q_4_1">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-4'"/>
            </xsl:call-template>
        </h2>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="S04_IEDProcedureRequirementsIntegrated"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S04_IEDProcedureRequirementsIntegrated'">
            </xsl:with-param>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="relevantElem" select="S04_IEDProcedureRequirementsIntegratedYes"/>
            <xsl:with-param
                    name="relevantLabel" select="'S04_IEDProcedureRequirementsIntegratedYes'">
            </xsl:with-param>
            <xsl:with-param name="relevantElemTableHeader" select="'S04_IEDProcedureRequirementsIntegratedYes-IEDProcedureRequirementsIntegrationType|S04_IEDProcedureRequirementsIntegratedYes-IntegrationYesNo|S04_IEDProcedureRequirementsIntegratedNo-CoordinationComments'"/>
        </xsl:call-template>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="S04_IEDProcedureRequirementsIntegrated"/>
            <xsl:with-param
                    name="yesNoLabel" select="''"/>
            <xsl:with-param name="yesNoValue" select="'no'"/>
            <xsl:with-param name="relevantElem" select="S04_IEDProcedureRequirementsIntegratedNo"/>
            <xsl:with-param
                    name="relevantLabel" select="'S04_IEDProcedureRequirementsIntegratedNo'">
            </xsl:with-param>
            <xsl:with-param name="relevantElemTableHeader" select="'S04_IEDProcedureRequirementsIntegratedNo-ETSPermitCoordinationTypes|S04_IEDProcedureRequirementsIntegratedNo-ETSPermitCoordinationYesNo|S04_IEDProcedureRequirementsIntegratedNo-CoordinationComments'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_4_2">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S04_NationalLawPermitUpdate'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S04_NationalLawPermitUpdate-PermitChangeCategory|S04_NationalLawPermitUpdate-PermitUpdateNationalLawDetail'"/>
            <xsl:with-param name="curElem" select="S04_NationalLawPermitUpdate"/>
            <xsl:with-param name="otherPleaseSpecify" select="'permit_updates'"/>
        </xsl:call-template>
        <xsl:call-template name="getOneRowTableWithHeader">
            <xsl:with-param name="elem" select="PermitUpdateTotalNumber"/>
            <xsl:with-param name="label" select="'S04_PermitUpdateTotalNumber-PermitUpdateTotalNumber'"/>
            <xsl:with-param name="header" select="'S04_PermitUpdateTotalNumber'"/>
        </xsl:call-template>
    </xsl:template>

    <xsl:template match="Q_5_1">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'Q_5'"/>
            </xsl:call-template>
        </h2>
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-5a'"/>
            </xsl:call-template>
        </h2>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="AdditionalNationalLegislation"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_AdditionalNationalLegislation'"></xsl:with-param>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="AdditionalNationalLegislationDetail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_AdditionalNationalLegislationDetail'"></xsl:with-param>
        </xsl:call-template>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="AdditionalNationalGuidance"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_AdditionalNationalGuidance'">
            </xsl:with-param>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="AdditionalNationalGuidanceDetail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_AdditionalNationalGuidanceDetail'">
            </xsl:with-param>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_2">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_ComplementaryMeasuresReporting'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTwoRowTable">
            <xsl:with-param name="elem" select="ComplementaryMeasuresReporting"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_3">

        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="MSCustomisedTemplates"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_MSCustomisedTemplates'">
            </xsl:with-param>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S05_MSCustomisedTemplatesDetail1"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_MSCustomisedTemplatesDetail'">
            </xsl:with-param>
            <xsl:with-param name="relevantElem2" select="S05_MSCustomisedTemplatesDetail2"/>
            <xsl:with-param name="comment2" select="'S05_MSCustomisedTemplatesDetail-comment1'"/>
            <xsl:with-param name="comment3" select="'S05_MSCustomisedTemplatesDetail-comment2'"/>
        </xsl:call-template>
        <xsl:call-template name="getTwoRowTable">
            <xsl:with-param name="elem" select="ComplyMeasuresArt74"/>
            <xsl:with-param name="label" select="'S05_ComplyMeasuresArt74'">
            </xsl:with-param>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="S05_MSCustomisedTemplatesDetail1|S05_MSCustomisedTemplatesDetail2">
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'|S05_MSCustomisedTemplatesDetail-SpecificTemplateOrFileFormat|S05_MSCustomisedTemplatesDetail-HowTemplateSpecific'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_4">
    <h3>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S05_AutomatedSystemInformationExchange'"/>
        </xsl:call-template>
    </h3>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="AutomatedSystemInformationExchange"/>
            <xsl:with-param
                name="yesNoLabel" select="'S05_AutomatedSystemInformationExchange'"></xsl:with-param>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="ComplyRequirementsArt75"/>
            <xsl:with-param
                name="relevantLabel" select="'S05_AutomatedSystemInformationExchangeDetails'"></xsl:with-param>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_5/S05_InstallationFuelConsEmissions">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-5b'"/>
            </xsl:call-template>
        </h2>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_InstallationFuelConsEmissions'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_InstallationFuelConsEmissions-FuelType|S05_InstallationFuelConsEmissions-FuelConsumption|S05_InstallationFuelConsEmissions-FuelAnnualEmissions'"/>
            <xsl:with-param name="otherPleaseSpecify" select="'OtherFossilFuels'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_InstallationFuelConsEmissions-comment'"/>
            </xsl:call-template>
        </div>
    </xsl:template>
    <xsl:template match="Q_5_6/S05_AggregateTotalEmissionsByCRF">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_AggregateTotalEmissionsByCRF'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_AggregateTotalEmissionsByCRF-CRFCategory1|S05_AggregateTotalEmissionsByCRF-CRFCategory2|S05_AggregateTotalEmissionsByCRF-TotalEmissionsTCo2e|S05_AggregateTotalEmissionsByCRF-TotalCombustionEmissionsTCo2e|S05_AggregateTotalEmissionsByCRF-TotalProcessEmissionsTCo2e'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_7/S05_LiteratureAndDefaultValueJustification">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_LiteratureAndDefaultValueJustification'"/>
            </xsl:call-template>
        </h3>
        <ul>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_LiteratureAndDefaultValueJustification-1'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_LiteratureAndDefaultValueJustification-2'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_LiteratureAndDefaultValueJustification-3'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_LiteratureAndDefaultValueJustification-4'"/>
                </xsl:call-template>
            </li>
        </ul>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_LiteratureAndDefaultValueJustification-ValueType|S05_LiteratureAndDefaultValueJustification-FuelMaterialType|S05_LiteratureAndDefaultValueJustification-InstallationCalculationFactor|S05_LiteratureAndDefaultValueJustification-InstallationValueInPractice|S05_LiteratureAndDefaultValueJustification-SourceValueJustification|S05_LiteratureAndDefaultValueJustification-InstallationNumberApproved'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_LiteratureAndDefaultValueJustification-comment1'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_LiteratureAndDefaultValueJustification-comment2'"/>
            </xsl:call-template>
        </div>
        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_Type1DefaultValueCount'"/>
            </xsl:call-template>
        </h4>
        <xsl:call-template name="getOneRowTable">
            <xsl:with-param name="elem" select="../Type1DefaultValueCount"/>
            <xsl:with-param
                    name="label"><xsl:value-of select="'S05_Type1DefaultValueCount'"/></xsl:with-param>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_8">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationSamplingPlansArt33"/>
            <xsl:with-param name="yesNoLabel" select="'S05_InstallationSamplingPlansArt33'"/>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'no'"/>
            <xsl:with-param name="relevantElem" select="InstallationNoSamplingPlansReasons"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_InstallationNoSamplingPlansReasons'">
            </xsl:with-param>
        </xsl:call-template>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationSamplingPlansProblems"/>
            <xsl:with-param name="yesNoLabel" select="'S05_InstallationSamplingPlansProblems'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="InstallationSamplingPlansProblemsDetail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_InstallationSamplingPlansProblemsDetail'">
            </xsl:with-param>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_9/S05_InstallationDifferentSamplingFrequency">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_InstallationDifferentSamplingFrequency'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_InstallationDifferentSamplingFrequency-SamplingFuelMaterial|S05_InstallationDifferentSamplingFrequency-CountInstallationsDiffFrequency|S05_InstallationDifferentSamplingFrequency-MajorSourceStreams|S05_InstallationDifferentSamplingFrequency-SamplingPlanDocumented'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_10/S05_CategoryCHighestTierNotApplied">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_CategoryCHighestTierNotApplied'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_CategoryCHighestTierNotApplied-InstallationID|S05_CategoryCHighestTierNotApplied-SourceStreamAffected|S05_CategoryCHighestTierNotApplied-EmissionSourceAffected|S05_CategoryCHighestTierNotApplied-MonitoringParameterAffected|S05_CategoryCHighestTierNotApplied-HighestTierRequired|S05_CategoryCHighestTierNotApplied-TierInPractice'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_CategoryCHighestTierNotApplied-comment1'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_CategoryCHighestTierNotApplied-comment2'"/>
            </xsl:call-template>
        </div>
    </xsl:template>
    <xsl:template match="Q_5_11/S05_CategoryBHighestTierNotApplied">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_CategoryBNotHighestTier'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_CategoryBNotHighestTier-MonitoringMethodology|S05_CategoryBNotHighestTier-CategoryBMainActivity|S05_CategoryBNotHighestTier-CategoryBInstallationsAffected'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_CategoryBNotHighestTier-comment1'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_CategoryBNotHighestTier-comment2'"/>
            </xsl:call-template>
        </div>
    </xsl:template>
    <xsl:template match="Q_5_12">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="FallBackApproachApplied"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_FallBackApproachApplied'"/>

            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S05_FallBackApproachAppliedDetail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_FallBackApproachAppliedDetail'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S05_FallBackApproachAppliedDetail-InstallationID|S05_FallBackApproachAppliedDetail-FallBackReason|S05_FallBackApproachAppliedDetail-ParameterNotTier1|S05_FallBackApproachAppliedDetail-ParameterEmissions'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_13/S05_ImprovementReportArt69">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_ImprovementReportArt69'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_ImprovementReportArt69-InstallationCategory|S05_ImprovementReportArt69-Annex1Activity|S05_ImprovementReportArt69-ImprovementReportType|S05_ImprovementReportArt69-ImprovementReportRequired|S05_ImprovementReportArt69-ImprovementReportSubmitted'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_CategoryBNotHighestTier-comment2'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_ImprovementReportArt69-comment'"/>
            </xsl:call-template>
        </div>
    </xsl:template>
    <xsl:template match="Q_5_14">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InherentCarbonTransferred"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_InherentCarbonTransferred'"/>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S05_InherentCarbonTransferredDetail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_InherentCarbonTransferredDetail'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S05_InherentCarbonTransferredDetail-InstallationID|S05_InherentCarbonTransferredDetail-TransferType|S05_InherentCarbonTransferredDetail-InstallationIDCo2TransferredTo|S05_InherentCarbonTransferredDetail-AmountCO2Transferred|S05_InherentCarbonTransferredDetail-InherentCO2Received|S05_InherentCarbonTransferredDetail-ReceivingInstallationType|S05_InherentCarbonTransferredDetail-StorageSitePermitNumber'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_15">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_InnovativeTechnologyArt49'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTwoRowTable">
            <xsl:with-param name="elem" select="InnovativeTechnologyArt49"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_16">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="ContinuousEmissionsMeasurement"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_ContinuousEmissionsMeasurement'"/>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S05_ContinuousEmissionsMeasurementDetail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_ContinuousEmissionsMeasurementDetail'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S05_ContinuousEmissionsMeasurementDetail-InstallationIDCO2|S05_ContinuousEmissionsMeasurementDetail-InstallationIDN2O|S05_ContinuousEmissionsMeasurementDetail-TotalEmissionsCO2E|S05_ContinuousEmissionsMeasurementDetail-ContinuousMeasurementTotalEmissions|S05_ContinuousEmissionsMeasurementDetail-FlueGasContainBiomass'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_17">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_BiomassInstallations'"/>
            </xsl:call-template>
        </h3>
        <ul>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_BiomassInstallations-1'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_BiomassInstallations-2'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_BiomassInstallations-3'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_BiomassInstallations-4'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_BiomassInstallations-5'"/>
                </xsl:call-template>
            </li>
        </ul>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_BiomassInstallations-Annex1Activity|S05_BiomassInstallations-BiomassInstallationCategory|S05_BiomassInstallations-NumberUsingBiomass|S05_BiomassInstallations-SustainabilitySatisfied|S05_BiomassInstallations-SustainabilityNotSatisfied|S05_BiomassInstallations-EnergyZeroRatedBiomass|S05_BiomassInstallations-EnergyNonZeroRatedBiomass'"/>
            <xsl:with-param name="curElem" select="S05_BiomassInstallations"/>
        </xsl:call-template>
        <xsl:call-template name="getTwoRowTable">
            <xsl:with-param name="label" select="'S05_SustainabilityComplianceDemonstrate'"/>

            <xsl:with-param name="elem" select="SustainabilityComplianceDemonstrate"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_18/S05_WasteFuelFossilCO2">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_WasteFuelFossilCO2'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_WasteFuelFossilCO2-WasteType|S05_WasteFuelFossilCO2-WasteEmissions'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_19">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="SimplifiedMonitoringArt13"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_SimplifiedMonitoringArt13'">
            </xsl:with-param>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S05_SimplifiedMonitoringArt13Detail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_SimplifiedMonitoringArt13Detail'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S05_SimplifiedMonitoringArt13Detail-Art13RiskAssessmentType|S05_SimplifiedMonitoringArt13Detail-Art13RiskAssessmentPrinciples'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_20">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="SimplifyComplianceLowEmissions"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_SimplifyComplianceLowEmissions'">
            </xsl:with-param>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S05_SimplifyComplianceLowEmissionsDetail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_SimplifyComplianceLowEmissionsDetail'"></xsl:with-param>
            <xsl:with-param name="relevantElemTableHeader" select="'S05_SimplifyComplianceLowEmissionsDetail-InnovativeWaysSimplifyCompliance|S04_IEDProcedureRequirementsIntegratedYes-IntegrationYesNo'"/>
            <xsl:with-param name="otherPleaseSpecify" select="'Other_please_specify'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_21/S05_AircraftMethodFuelConsumption">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-5c'"/>
            </xsl:call-template>
        </h2>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_AircraftMethodFuelConsumption'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_AircraftMethodFuelConsumption-AircraftFuelConsumptionMethodAB|S05_AircraftMethodFuelConsumption-CountAircraftOperators|S05_AircraftMethodFuelConsumption-SmallEmittersShare'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_22">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_FlightEmissions'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_FlightEmissions-TotalFlightEmissions|S05_FlightEmissions-TotalDomesticFlightEmissions'"/>
            <xsl:with-param name="curElem" select="."/>
            <xsl:with-param name="tableType" select="'onerow'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_23">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_FlightBiofuels'"/>
            </xsl:call-template>
        </h3>
        <ul>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_FlightBiofuels-1'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_FlightBiofuels-2'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_FlightBiofuels-3'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_FlightBiofuels-4'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_FlightBiofuels-5'"/>
                </xsl:call-template>
            </li>
        </ul>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_FlightBiofuels-CountOperatorsUsingBiofuels|S05_FlightBiofuels-EmissionsBiofuelsSustainabilitySatisfied|S05_FlightBiofuels-EmissionsBiofuelsSustainabilityNotSatisfied|S05_FlightBiofuels-EnergyZeroRatedBiofuels|S05_FlightBiofuels-EnergyNonZeroRatedBiofuels'"/>
            <xsl:with-param name="curElem" select="."/>
            <xsl:with-param name="tableType" select="'onerow'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_24/S05_SmallEmittersTool">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_SmallEmittersTool'"/>
            </xsl:call-template>
        </h3>
        <ul>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_SmallEmittersTool-1'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_SmallEmittersTool-2'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_SmallEmittersTool-3'"/>
                </xsl:call-template>
            </li>
            <li>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'S05_SmallEmittersTool-4'"/>
                </xsl:call-template>
            </li>
        </ul>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="''"/>
            <xsl:with-param name="curElem" select="."/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_25">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S05_SmallEmittersTool-comment'"/>
            </xsl:call-template>
        </h3>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S05_AircraftImprovementReportsArt69-AircraftImprovementReportRequired|S05_AircraftImprovementReportsArt69-AircraftImprovementReportSubmitted'"/>
            <xsl:with-param name="curElem" select="."/>
            <xsl:with-param name="tableType" select="'onerow'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_26">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="AircraftSimplifiedMonitoringArt13"/>
            <xsl:with-param
                    name="yesNoLabel" select="'S05_AircraftSimplifiedMonitoringArt13'">
            </xsl:with-param>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S05_AircraftSimplifiedMonitoringArt13Detail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_AircraftSimplifiedMonitoringArt13Detail'"></xsl:with-param>
            <xsl:with-param name="relevantElemTableHeader" select="'S05_AircraftSimplifiedMonitoringArt13Detail-AircraftRiskAssessmentType|S05_AircraftSimplifiedMonitoringArt13Detail-AircraftGeneralRiskAssessmentPrinciples'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_5_27">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="SmallEmittersSimplifyArt54"/>
            <xsl:with-param name="yesNoLabel" select="'S05_SmallEmittersSimplifyArt54'"/>
            <xsl:with-param name="yesNoElemType" select="'tworows'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S05_SmallEmittersSimplifyArt54Detail"/>
            <xsl:with-param
                    name="relevantLabel" select="'S05_SmallEmittersSimplifyArt54Detail'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S05_SmallEmittersSimplifyArt54Detail-SmallEmittersInnovativeSimplification|S11_InstallationsComplianceMeasures-ComplianceMeasuresYesNo'"/>
            <xsl:with-param name="otherPleaseSpecify" select="'please_specify'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_6_1">
        <h2> <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-6'"/>
        </xsl:call-template></h2>
        <h5>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-6a'"/>
            </xsl:call-template>
        </h5>
        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AccredCertVerifiersAnnexI'"/>
            </xsl:call-template>
        </h4>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S06_AccredCertVerifiersAnnexI-AccredCertScope|S06_AccredCertVerifiersAnnexI-NumberAccredited|S06_AccredCertVerifiersAnnexI-NumberCertified'"/>
            <xsl:with-param name="curElem" select="S06_AccredCertVerifiersAnnexI"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_6_2">
        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_ApplicationInformationExchangeRequirements1'"/>
            </xsl:call-template>
        </h4>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S06_ApplicationInformationExchangeRequirements1-QuestionField|S06_ApplicationInformationExchangeRequirements1-NumberOfVerifiersInstallations|S06_ApplicationInformationExchangeRequirements1-NumberOfVerifiersAviation'"/>
            <xsl:with-param name="curElem" select="S06_ApplicationInformationExchangeRequirements1"/>
        </xsl:call-template>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'|S06_ApplicationInformationExchangeRequirements2-NumberImposedOnVerifiersSuspension|S06_ApplicationInformationExchangeRequirements2-NumberImposedOnVerifiersWithdrawal|S06_ApplicationInformationExchangeRequirements2-NumberImposedOnVerifiersReductionOfScope'"/>
            <xsl:with-param name="curElem" select="S06_ApplicationInformationExchangeRequirements2"/>
        </xsl:call-template>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'|                                       '"/>
            <xsl:with-param name="curElem" select="S06_ApplicationInformationExchangeRequirements3"/>
        </xsl:call-template>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'|S06_ApplicationInformationExchangeRequirements4-NumberOfIssues-last|S06_ApplicationInformationExchangeRequirements4-NumberOfIssuesResolved-last'"/>
            <xsl:with-param name="curElem" select="S06_ApplicationInformationExchangeRequirements4"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_6_3">
        <h5>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-6b'"/>
            </xsl:call-template>
        </h5>
        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_InstallationsConservativeEstimates'"/>
            </xsl:call-template>
        </h4>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S06_InstallationsConservativeEstimates-InstallationID|S06_InstallationsConservativeEstimates-InstallationAnnualEmissionstCO2e|S06_InstallationsConservativeEstimates-ReasonConservativeEstimate|S06_InstallationsConservativeEstimates-InstallationConservativeShare|S06_InstallationsConservativeEstimates-ConservativeMethod|S06_InstallationsConservativeEstimates-FurtherAction'"/>
            <xsl:with-param name="curElem" select="S06_InstallationsConservativeEstimates"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_InstallationsConservativeEstimates-comment-1'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_InstallationsConservativeEstimates-comment-3'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_InstallationsConservativeEstimates-comment-2'"/>
            </xsl:call-template>
        </div>
    </xsl:template>
    <xsl:template match="Q_6_4">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationsVerificationReportIssues"/>
            <xsl:with-param name="yesNoLabel" select="'S06_InstallationsVerificationReportIssues'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S06_InstallationsVerificationReportsIssueDetail"/>
            <xsl:with-param name="relevantLabel"  select="'S06_InstallationsVerificationReportsIssueDetail'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S06_InstallationsVerificationReportsIssueDetail-AnnexIActivity|S06_InstallationsVerificationReportsIssueDetail-TypeOfIssue|S06_InstallationsVerificationReportsIssueDetail-NumberOfInstallations|S06_InstallationsVerificationReportsIssueDetail-MainReasonForIssues|S06_InstallationsVerificationReportsIssueDetail-ShareOfReportsConservativeEstimate'"/>

        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_6_5">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationsVerificationReportChecks"/>
            <xsl:with-param name="yesNoLabel" select="'S06_InstallationsVerificationReportChecks'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S06_InstallationsVerificationReportChecksDetail1"/>
            <xsl:with-param  name="relevantLabel" select="'S06_InstallationsVerificationReportChecksDetail1'"/>
             <xsl:with-param name="relevantElemTableHeader" select="'S06_InstallationsVerificationReportChecksDetail1-VerificationReportChecksDetailQuestions||'"/>
        </xsl:call-template>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationsVerificationReportChecks"/>
            <xsl:with-param name="yesNoLabel" select="''"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S06_InstallationsVerificationReportChecksDetail2"/>
            <xsl:with-param  name="relevantLabel" select="''"/>
            <xsl:with-param name="relevantElemTableHeader" select="'||'"/>
        </xsl:call-template>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationsVerificationReportChecks"/>
            <xsl:with-param name="yesNoLabel" select="''"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S06_InstallationsVerificationReportChecksDetail3"/>
            <xsl:with-param  name="relevantLabel" select="''"/>
            <xsl:with-param name="relevantElemTableHeader" select="'||'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_InstallationsVerificationReportChecksDetail3-comment'"/>
            </xsl:call-template>
        </div>
    </xsl:template>
    <xsl:template match="Q_6_6">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationVisitsWaivedHighEmitters"/>
            <xsl:with-param name="yesNoLabel" select="'S06_InstallationVisitsWaivedHighEmitters'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S06_InstallationsVisitsWaivedHighEmittersDetail"/>
            <xsl:with-param name="relevantLabel"  select="'S06_InstallationsVisitsWaivedHighEmittersDetail'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S06_InstallationsVisitsWaivedHighEmittersDetail-ConditionForWaiving|S06_InstallationsVisitsWaivedHighEmittersDetail-AnnexIActivity|S06_InstallationsVisitsWaivedHighEmittersDetail-NumberOfInstallations'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_InstallationsVisitsWaivedHighEmittersDetail-comment'"/>
            </xsl:call-template>
        </div>

        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="InstallationsVisitsWaivedLowEmitters"/>
            <xsl:with-param name="yesNoLabel" select="'S06_InstallationsVisitsWaivedLowEmitters'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="InstallationsVisitsWaivedLowEmittersDetail"/>
            <xsl:with-param name="relevantLabel"  select="'S06_InstallationsVisitsWaivedLowEmittersDetail'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'|'"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template match="Q_6_7">
        <h5>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'title-6c'"/>
            </xsl:call-template>
        </h5>
        <h4>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AircraftOperatorsConservativeEstimates'"/>
            </xsl:call-template>
        </h4>
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S06_AircraftOperatorsConservativeEstimates-AircraftOperatorID|S06_AircraftOperatorsConservativeEstimates-AircraftOperatorsAnnualEmissionsCO2e|S06_AircraftOperatorsConservativeEstimates-ReasonConservativeEstimate|S06_AircraftOperatorsConservativeEstimates-AircraftOperatorsConservativeShare|S06_AircraftOperatorsConservativeEstimates-ConservativeMethod|S06_AircraftOperatorsConservativeEstimates-FurtherAction'"/>
            <xsl:with-param name="curElem" select="S06_AircraftOperatorsConservativeEstimates"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AircraftOperatorsConservativeEstimates-comment-1'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AircraftOperatorsConservativeEstimates-comment-3'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AircraftOperatorsConservativeEstimates-comment-2'"/>
            </xsl:call-template>
        </div>
    </xsl:template>
    <xsl:template match="Q_6_8">
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="AircraftOperatorsVerificationReportIssues"/>
            <xsl:with-param name="yesNoLabel" select="'S06_AircraftOperatorsVerificationReportIssues'"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S06_AircraftOperatorsVerificationReportIssuesEmissions"/>
            <xsl:with-param name="relevantLabel"  select="'S06_AircraftOperatorsVerificationReportIssuesEmissions'"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S06_AircraftOperatorsVerificationReportIssuesEmissions-TypeOfIssue|S06_AircraftOperatorsVerificationReportIssuesEmissions-NumberOfAircraftOperators|S06_AircraftOperatorsVerificationReportIssuesEmissions-MainReasonForIssues|S06_AircraftOperatorsVerificationReportIssuesEmissions-ShareOfReportsConservativeEstimate'"/>
            <xsl:with-param  name="tabelSpecialHeading" select="'S06_AircraftOperatorsVerificationReportIssuesEmissions-note'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AircraftOperatorsVerificationReportIssuesEmissions-comment-2'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AircraftOperatorsVerificationReportIssuesEmissions-comment'"/>
            </xsl:call-template>
        </div>
        <xsl:call-template name="relevantYesNoQuestion">
            <xsl:with-param name="yesNoElem" select="AircraftOperatorsVerificationReportIssues"/>
            <xsl:with-param name="yesNoLabel" select="''"/>
            <xsl:with-param name="yesNoValue" select="'yes'"/>
            <xsl:with-param name="relevantElem" select="S06_AircraftOperatorsVerificationReportIssuesTKM"/>
            <xsl:with-param  name="relevantLabel" select="''"/>
            <xsl:with-param name="relevantElemTableHeader" select="'S06_AircraftOperatorsVerificationReportIssuesTKM-TypeOfIssue|S06_AircraftOperatorsVerificationReportIssuesTKM-NumberOfAircraftOperators|S06_AircraftOperatorsVerificationReportIssuesTKM-MainReasonForIssues'"/>
            <xsl:with-param  name="tabelSpecialHeading" select="'S06_AircraftOperatorsVerificationReportIssuesTKM-note'"/>
        </xsl:call-template>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AircraftOperatorsVerificationReportIssuesTKM-comment-2'"/>
            </xsl:call-template>
        </div>
        <div class="note">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S06_AircraftOperatorsVerificationReportIssuesTKM-comment'"/>
            </xsl:call-template>
        </div>
    </xsl:template>
<xsl:template match="Q_6_9">
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorsVerificationReportChecks"/>
        <xsl:with-param name="yesNoLabel" select="'S06_AircraftOperatorsVerificationReportChecks'"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S06_AircraftOperatorsVerificationEmissionReportChecks1"/>
        <xsl:with-param  name="relevantLabel" select="'S06_AircraftOperatorsVerificationEmissionReportChecks1'"/>
        <xsl:with-param name="relevantElemTableHeader" select="'S06_AircraftOperatorsVerificationEmissionReportChecks1-VerificationReportChecksDetailQuestions||'"/>
        <xsl:with-param  name="tabelSpecialHeading" select="'S06_AircraftOperatorsVerificationEmissionReportChecks1-note'"/>
    </xsl:call-template>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorsVerificationReportChecks"/>
        <xsl:with-param name="yesNoLabel" select="''"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S06_AircraftOperatorsVerificationEmissionReportChecks2"/>
        <xsl:with-param  name="relevantLabel" select="''"/>
        <xsl:with-param name="relevantElemTableHeader" select="'||'"/>
    </xsl:call-template>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorsVerificationReportChecks"/>
        <xsl:with-param name="yesNoLabel" select="''"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S06_AircraftOperatorsVerificationEmissionReportChecks3"/>
        <xsl:with-param  name="relevantLabel" select="''"/>
        <xsl:with-param name="relevantElemTableHeader" select="'|'"/>
    </xsl:call-template>
    <div class="note">
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S06_AircraftOperatorsVerificationEmissionReportChecks2-comment'"/>
        </xsl:call-template>
    </div>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorsVerificationReportChecks"/>
        <xsl:with-param name="yesNoLabel" select="''"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S06_AircraftOperatorsVerificationTKMReportChecks1"/>
        <xsl:with-param  name="relevantLabel" select="''"/>
        <xsl:with-param name="relevantElemTableHeader" select="'S06_AircraftOperatorsVerificationTKMReportChecks1-VerificationReportChecksDetailQuestions||'"/>
        <xsl:with-param  name="tabelSpecialHeading" select="'S06_AircraftOperatorsVerificationTKMReportChecks1-note'"/>
    </xsl:call-template>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorsVerificationReportChecks"/>
        <xsl:with-param name="yesNoLabel" select="''"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S06_AircraftOperatorsVerificationTKMReportChecks2"/>
        <xsl:with-param  name="relevantLabel" select="''"/>
        <xsl:with-param name="relevantElemTableHeader" select="'||'"/>
    </xsl:call-template>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorsVerificationReportChecks"/>
        <xsl:with-param name="yesNoLabel" select="''"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S06_AircraftOperatorsVerificationTKMReportChecks3"/>
        <xsl:with-param  name="relevantLabel" select="''"/>
        <xsl:with-param name="relevantElemTableHeader" select="'|'"/>
    </xsl:call-template>
    <div class="note">
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S06_AircraftOperatorsVerificationTKMReportChecks3-comment'"/>
        </xsl:call-template>
    </div>
</xsl:template>
<xsl:template match="Q_6_10">
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorsVisitsWaivedLowEmitters"/>
        <xsl:with-param name="yesNoLabel" select="'S06_AircraftOperatorsVisitsWaivedLowEmitters'"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="AircraftOperatorsVisitsWaivedLowEmittersDetail"/>
        <xsl:with-param  name="relevantLabel" select="'S06_AircraftOperatorsVisitsWaivedLowEmittersDetail'"/>
        <xsl:with-param name="relevantElemTableHeader" select="'|S06_AircraftOperatorsVisitsWaivedLowEmittersDetail-AircraftOperatorsVisitsWaivedLowEmittersDetail'"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_7_1">
    <h2>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-7'"/>
        </xsl:call-template></h2>
    <h5>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S07_UploadDocument'"/>
        </xsl:call-template>
    </h5>
</xsl:template>
<xsl:template match="Q_7_2">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S07_NoFurtherAllowancesSurrendered'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S07_NoFurtherAllowancesSurrendered-InstallationIDCode|S07_NoFurtherAllowancesSurrendered-OperatorName|S07_NoFurtherAllowancesSurrendered-InstallationName|S07_NoFurtherAllowancesSurrendered-OutstandingAllowances|S07_NoFurtherAllowancesSurrendered-ReasonNoFurtherAllowancesSurrendered'"/>
        <xsl:with-param name="curElem" select="S07_NoFurtherAllowancesSurrendered"/>
    </xsl:call-template>
    <div class="note">
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S07_NoFurtherAllowancesSurrendered-comment'"/>
        </xsl:call-template>
    </div>

</xsl:template>
<xsl:template match="Q_7_3">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S07_AircraftOperatorsUseArt17Mandate'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'|'"/>
        <xsl:with-param name="curElem" select="AircraftOperatorsMandateArt17UseNumber"/>
    </xsl:call-template>
    <div class="note">
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S07_AircraftOperatorsUseArt17Mandate-comment'"/>
        </xsl:call-template>
    </div>
    <xsl:if test="string-length(./AircraftOperatorsMandateArt17UseNumber) &gt; 0">
        <xsl:call-template name="getTable">
            <xsl:with-param name="colHeaders" select="'S07_AircraftOperatorsUseArt17MandateDetail-AircraftOperatorID|S07_AircraftOperatorsUseArt17MandateDetail-AircraftOperatorName'"/>
            <xsl:with-param name="curElem" select="S07_AircraftOperatorsUseArt17MandateDetail"/>
        </xsl:call-template>
    </xsl:if>
    <div class="note">
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S07_AircraftOperatorsUseArt17MandateDetail-comment'"/>
        </xsl:call-template>
    </div>
</xsl:template>
<xsl:template match="Q_8_1">
    <h2>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-8'"/>
        </xsl:call-template></h2>
    <h5>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S08_Phase3InstallationChanges'"/>
        </xsl:call-template>
    </h5>

    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S08_Phase3InstallationChanges-ReasonForAllocationChange|S08_Phase3InstallationChanges-NumberOfChangesDuringPhase3|S08_Phase3InstallationChanges-AllowancesChangedDuringPhase3|S08_Phase3InstallationChanges-NumberOfChangesSincePhase3Start|S08_Phase3InstallationChanges-AllowancesChangedSincePhase3Start'"/>
        <xsl:with-param name="curElem" select="S08_Phase3InstallationChanges"/>
    </xsl:call-template>
</xsl:template>

<xsl:template match="Q_8_2">
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="NotNotifiedChanges"/>
        <xsl:with-param name="yesNoLabel" select="'S08_NotNotifiedChanges'"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S08_NotNotifiedChangesDetail"/>
        <xsl:with-param  name="relevantLabel" select="'S08_NotNotifiedChangesDetail'"/>
        <xsl:with-param name="relevantElemTableHeader" select="'S08_NotNotifiedChangesDetail-NumberChangesNotNotified|S08_NotNotifiedChangesDetail-HowChangesIdentified'"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_8_3">
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="Article10Applied"/>
        <xsl:with-param name="yesNoLabel" select="'S08_Article10CApplied'"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S08_Article10CAppliedDetail"/>
        <xsl:with-param  name="relevantLabel" select="'S08_Article10CAppliedDetail'"/>
        <xsl:with-param name="relevantElemTableHeader" select="'|S08_Article10CAppliedDetail-Article10CValuesWithinPeriod'"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_9_1">
    <h2>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-9'"/>
        </xsl:call-template></h2>

    <h5>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S09_HydroElectricProjectGuidelinesApplied'"/>
        </xsl:call-template>
    </h5>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S09_HydroElectricProjectGuidelinesApplied-HydroElectricMeasuresQuestions|yes|no'"/>
        <xsl:with-param name="curElem" select="S09_HydroElectricProjectGuidelinesApplied"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_10_1">
    <h2> <xsl:call-template name="getLabel">
        <xsl:with-param name="labelName" select="'Q_10'"/>
    </xsl:call-template></h2>
    <h5>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-10a'"/>
        </xsl:call-template>
    </h5>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="OperatorFees"/>
        <xsl:with-param name="yesNoLabel" select="'S10_InstallationOperatorFees'"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S10_InstallationOperatorFeesPermits"/>
        <xsl:with-param  name="relevantLabel" select="'S10_InstallationOperatorFeesPermits'"/>
        <xsl:with-param name="relevantElemTableHeader" select="'Reason_for_fee-description|Amount_in_Euros'"/>
    </xsl:call-template>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="OperatorFees"/>
        <xsl:with-param name="yesNoLabel" select="''"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S10_InstallationOperatorFeesAnnualSubsistence"/>
        <xsl:with-param  name="relevantLabel" select="''"/>
        <xsl:with-param name="relevantElemTableHeader" select="'Reason_for_fee-description|Amount_in_Euros'"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_10_2">
    <h5>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-10b'"/>
        </xsl:call-template>
    </h5>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorFees"/>
        <xsl:with-param name="yesNoLabel" select="'S10_AircraftOperatorFees'"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S10_AircraftOperatorFeesMonitoringPlans"/>
        <xsl:with-param  name="relevantLabel" select="'S10_AircraftOperatorFeesMonitoringPlans'"/>
        <xsl:with-param name="relevantElemTableHeader" select="'Reason_for_fee-description|Amount_in_Euros'"/>
    </xsl:call-template>
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="AircraftOperatorFees"/>
        <xsl:with-param name="yesNoLabel" select="''"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S10_AircraftOperatorFeesSubsistence"/>
        <xsl:with-param  name="relevantLabel" select="''"/>
        <xsl:with-param name="relevantElemTableHeader" select="'Reason_for_fee-description|Amount_in_Euros '"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_10_3">
    <h5>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-10c'"/>
        </xsl:call-template>
    </h5>
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S10_RegistryAccountFees'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'Reason_for_fee-description|Amount_in_Euros'"/>
        <xsl:with-param name="curElem" select="S10_RegistryAccountOneOffFees"/>
        <xsl:with-param name="tabelSpecialHeading" select="'Table_for_one-off_fees'"/>
    </xsl:call-template>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'Reason_for_fee-description|Amount_in_Euros'"/>
        <xsl:with-param name="curElem" select="S10_RegistryAccountAnnualFees"/>
        <xsl:with-param name="tabelSpecialHeading" select="'Table_for_annual_fees'"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_11_1">
    <h2> <xsl:call-template name="getLabel">
        <xsl:with-param name="labelName" select="'Q_11'"/>
    </xsl:call-template></h2>
    <h5>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-11a'"/>
        </xsl:call-template>
    </h5>
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_InstallationsComplianceMeasures'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S11_InstallationsComplianceMeasures-ComplianceMeasuresQuestions|S11_InstallationsComplianceMeasures-ComplianceMeasuresYesNo'"/>
        <xsl:with-param name="curElem" select="S11_InstallationsComplianceMeasures"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_11_2">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_InstallationsInfringementPenalties'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S11_InstallationsInfringementPenalties-InfringementType|fine-in-euros|imprisonment-in-month|other'"/>
        <xsl:with-param name="curElem" select="S11_InstallationsInfringementPenalties"/>
        <xsl:with-param name="colspanColumNr" select="'2|3'"/>
        <xsl:with-param name="colspanNr" select="'2|2'"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_11_3">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_InstallationsPenaltiesImposed'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'|fine-in-euros|imprisonment-in-month|other||'"/>
        <xsl:with-param name="curElem" select="S11_InstallationsPenaltiesImposed"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_11_4">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_OperatorPenalties'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S11_OperatorPenalties-InstallationID|S11_OperatorPenalties-OperatorName'"/>
        <xsl:with-param name="curElem" select="S11_OperatorPenalties"/>
    </xsl:call-template>
    <div class="note">
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_OperatorPenalties-comment'"/>
        </xsl:call-template>
    </div>
</xsl:template>
<xsl:template match="Q_11_5">

    <h5>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'title-11b'"/>
        </xsl:call-template>
    </h5>
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_AircraftComplianceMeasures'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S11_AircraftComplianceMeasures-ComplianceMeasuresQuestions|S04_IEDProcedureRequirementsIntegratedNo-ETSPermitCoordinationYesNo'"/>
        <xsl:with-param name="curElem" select="S11_AircraftComplianceMeasures"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_11_6">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_AircraftInfringementPenalties'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'|min|max|min|max|'"/>
        <xsl:with-param name="curElem" select="S11_AircraftInfringementPenalties"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_11_7">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_AircraftPenaltiesImposed'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'|fine-in-euros|imprisonment-in-month|other|S04_IEDProcedureRequirementsIntegratedYes-IntegrationYesNo|S04_IEDProcedureRequirementsIntegratedYes-IntegrationYesNo'"/>
        <xsl:with-param name="curElem" select="S11_AircraftPenaltiesImposed"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_11_8">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_AircraftPenalties'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S11_AircraftPenalties-AircraftOperatorID|S11_AircraftPenalties-AircraftName'"/>
        <xsl:with-param name="curElem" select="S11_AircraftPenalties"/>
    </xsl:call-template>
    <div class="note">
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_AircraftPenalties-comment'"/>
        </xsl:call-template>
    </div>
</xsl:template>
<xsl:template match="Q_11_9">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S11_OperatingBanRequest'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="''"/>
        <xsl:with-param name="curElem" select="OperatingBanRequestMeasures"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_12_1">
    <h2> <xsl:call-template name="getLabel">
        <xsl:with-param name="labelName" select="'Q_12'"/>
    </xsl:call-template></h2>
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S12_LegalNatureOfEmissionAllowance'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="''"/>
        <xsl:with-param name="curElem" select="LegalNatureOfEmissionAllowance"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_12_2">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S12_AccountingTreatmentOfEmissionAllowances'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="''"/>
        <xsl:with-param name="curElem" select="AccountingTreatmentOfEmissionAllowances"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_12_3">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S12_VATdueEmissionAllowancesIssuance'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="''"/>
        <xsl:with-param name="curElem" select="VATdueEmissionAllowancesIssuance"/>
    </xsl:call-template>
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S12_VATdueEmissionAllowancesSecondaryMarkets'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="''"/>
        <xsl:with-param name="curElem" select="VATdueEmissionAllowancesSecondaryMarkets"/>
    </xsl:call-template>
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S12_ReverseChargeMechanismEmissionAllowances'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="''"/>
        <xsl:with-param name="curElem" select="ReverseChargeMechanismEmissionAllowances"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_12_4">
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="EmissionAllowancesTaxed"/>
        <xsl:with-param name="yesNoLabel" select="'S12_EmissionAllowancesTaxed'"/>
        <xsl:with-param name="yesNoValue" select="'yes'"/>
        <xsl:with-param name="relevantElem" select="S12_TypeOfTaxRatesApplied"/>
        <xsl:with-param  name="relevantLabel" select="'S12_TypeOfTaxRatesApplied'"/>
        <xsl:with-param name="relevantElemTableHeader" select="'S12_TypeOfTaxRatesApplied-TypeOfTax|S12_TypeOfTaxRatesApplied-TaxRateApplied'"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_13_1">
    <h2> <xsl:call-template name="getLabel">
        <xsl:with-param name="labelName" select="'Q_13'"/>
    </xsl:call-template></h2>
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S13_FraudFreeAllocationOfAllowances'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S13_FraudFreeAllocationOfAllowances-ArrangementsConcerningFraudActivities|S13_FraudFreeAllocationOfAllowances-DetailsOfProceduresInNationalLaw'"/>
        <xsl:with-param name="curElem" select="S13_FraudFreeAllocationOfAllowances"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_13_2">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S13_CompetentAuthoritiesAwareOfFraud'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S13_CompetentAuthoritiesAwareOfFraud-ArrangementsConcerningFraudAwareness|S13_CompetentAuthoritiesAwareOfFraud-DetailsOfArrangementsAndProcedures'"/>
        <xsl:with-param name="curElem" select="S13_CompetentAuthoritiesAwareOfFraud"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_13_3">
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S13_InformationOnFraudActivities'"/>
        </xsl:call-template>
    </h4>
    <ul>
        <li>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S13_InformationOnFraudActivities-note1'"/>
            </xsl:call-template>
        </li>
        <li>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S13_InformationOnFraudActivities-note2'"/>
            </xsl:call-template>
        </li>
        <li>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S13_InformationOnFraudActivities-note3'"/>
            </xsl:call-template>
        </li>
        <li>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'S13_InformationOnFraudActivities-note4'"/>
            </xsl:call-template>
        </li>
    </ul>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S13_InformationOnFraudActivities-InformationOnFraudActivities|S13_InformationOnFraudActivities-NumberOfActivities|S13_InformationOnFraudActivities-TypeOfFraudActivities'"/>
        <xsl:with-param name="curElem" select="S13_InformationOnFraudActivities"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_14_1">
    <h2> <xsl:call-template name="getLabel">
        <xsl:with-param name="labelName" select="'Q_14'"/>
    </xsl:call-template></h2>
    <h4>
        <xsl:call-template name="getLabel">
            <xsl:with-param name="labelName" select="'S14_AnyOtherIssues'"/>
        </xsl:call-template>
    </h4>
    <xsl:call-template name="getTable">
        <xsl:with-param name="colHeaders" select="'S14_AnyOtherIssues-QuestionnaireSection|S14_AnyOtherIssues-OtherInformationOrIssues'"/>
        <xsl:with-param name="curElem" select="S14_AnyOtherIssues"/>
    </xsl:call-template>
</xsl:template>
<xsl:template match="Q_14_2">
    <xsl:call-template name="relevantYesNoQuestion">
        <xsl:with-param name="yesNoElem" select="QuestionnaireFilledConfirmation"/>
        <xsl:with-param name="yesNoLabel" select="'QuestionnaireFilledConfirmation'"/>
        <xsl:with-param name="yesNoValue" select="'no'"/>
        <xsl:with-param name="relevantElem" select="OtherComments"/>
        <xsl:with-param  name="relevantLabel" select="'OtherComments'"/>
        <xsl:with-param name="relevantElemTableHeader" select="''"/>
    </xsl:call-template>
</xsl:template>


    <!-- common templates building HTML elements -->
    <xsl:template name="getTable">
        <xsl:param name="colHeaders" select="''"/>
        <xsl:param name="otherPleaseSpecify" select="''"/>
        <xsl:param name="tableType" select="'repeating'"/>
        <xsl:param name="curElem" select="."/>
        <xsl:param name="tabelSpecialHeading" select="''"/>

        <!-- header colspan parameters -->
        <xsl:param name="colspanColumNr" select="''"/>
        <xsl:param name="colspanNr" select="''"/>

        <table  class="datatable">
            <xsl:attribute name="id">
                <xsl:value-of select="local-name($curElem)"/><!---->
            </xsl:attribute>
            <thead>
                <xsl:if test="string-length($tabelSpecialHeading) &gt; 0">
                    <h4 class="italicTableHeading"><xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="$tabelSpecialHeading"/>
                        </xsl:call-template>
                    </h4>

                </xsl:if>
                <xsl:if test="string-length(normalize-space(replace($colHeaders,'\|',''))) &gt; 0">
                    <xsl:variable name="headLenght" select="string-length(normalize-space(replace($colHeaders,'\|','')))"/>


                    <xsl:if test="local-name($curElem) = 'S08_Phase3InstallationChanges'">
                        <tr>
                            <th class="th-1" style="border:0px;"></th>
                            <th colspan="2" style="border:0px;" class="th-2"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S08_Phase3InstallationChanges-DuringPeriod'"/>
                            </xsl:call-template></th>
                            <th colspan="2" style="border:0px;" class="th-3"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S08_Phase3InstallationChanges-SincePeriod'"/>
                            </xsl:call-template></th>
                        </tr>

                    </xsl:if>
                    <xsl:if test="local-name($curElem) = 'S11_InstallationsPenaltiesImposed'">
                        <tr>
                            <th class="th-1" style="border:0px;">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_InstallationsPenaltiesImposed-ImposedInfringementType'"/>
                                </xsl:call-template>
                            </th>
                            <th colspan="3" style="border:0px;" class="th-2">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_InstallationsPenaltiesImposed-ActualPenaltiesImposed'"/>
                                </xsl:call-template>
                            </th>
                            <th style="border:0px;" class="th-3">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_InstallationsPenaltiesImposed-PenaltyOngoing'"/>
                                </xsl:call-template>
                            </th>
                            <th style="border:0px;" class="th-4">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_InstallationsPenaltiesImposed-PenaltyOngoing'"/>
                                </xsl:call-template>
                            </th>
                        </tr>

                    </xsl:if>
                    <xsl:if test="local-name($curElem) = 'S11_AircraftInfringementPenalties'">
                        <tr>
                            <th class="th-1" style="border:0px;">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_AircraftInfringementPenalties-InfringementType'"/>
                                </xsl:call-template>
                            </th>
                            <th colspan="2" style="border:0px;" class="th-2">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'fine-in-euros'"/>
                                </xsl:call-template>
                            </th>
                            <th colspan="2" style="border:0px;" class="th-3">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'imprisonment-in-month'"/>
                                </xsl:call-template>
                            </th>
                            <th style="border:0px;" class="th-4">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'other'"/>
                                </xsl:call-template>
                            </th>
                        </tr>
                    </xsl:if>
                    <xsl:if test="local-name($curElem) = 'S11_AircraftPenaltiesImposed'">
                        <tr>
                            <th class="th-1" style="border:0px;">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_AircraftInfringementPenalties-InfringementType'"/>
                                </xsl:call-template>
                            </th>
                            <th colspan="3" style="border:0px;" class="th-2">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_AircraftPenaltiesImposed-ActualPenaltiesImposed'"/>
                                </xsl:call-template>
                            </th>
                            <th  style="border:0px;" class="th-3">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_AircraftPenaltiesImposed-AircraftPenaltyOngoing'"/>
                                </xsl:call-template>
                            </th>
                            <th style="border:0px;" class="th-4">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S11_AircraftPenaltiesImposed-AircraftPenaltyExecuted'"/>
                                </xsl:call-template>
                            </th>
                        </tr>
                    </xsl:if>
                    <tr>
                        <xsl:variable name="cols" select="tokenize($colHeaders, '\|')"/>
                        <xsl:for-each select="$cols">
                                <th>
                                    <xsl:if test="(string-length(normalize-space(replace($colspanColumNr,'\|',''))) &gt; 0) and string-length(normalize-space(replace($colspanNr,'\|',''))) &gt; 0">
                                        <xsl:variable name="colPos" select="tokenize($colspanColumNr, '\|')"/>
                                        <xsl:variable name="colSpan" select="tokenize($colspanNr, '\|')"/>
                                        <xsl:attribute name="colspan">
                                            <xsl:value-of select="number(position())=number(.)"/>
                                        </xsl:attribute>
                                            <xsl:if test="contains($colspanColumNr,string(position()))">
                                                <xsl:attribute name="colspan">
                                                    <xsl:value-of select="$colSpan[number(.)]"/>
                                                </xsl:attribute>
                                            </xsl:if>
                                    </xsl:if>
                                    <xsl:attribute name="class">
                                        <xsl:value-of select="concat('th-',position())"/>
                                    </xsl:attribute>
                                    <xsl:if test="local-name($curElem)='S05_InstallationDifferentSamplingFrequency' and position()=last()">
                                        <xsl:attribute name="colspan" select="'2'"/>
                                    </xsl:if>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="."/>
                                    </xsl:call-template>
                                </th>

                        </xsl:for-each>
                    </tr>
                </xsl:if>
                <xsl:if test="local-name($curElem) = 'S02_CompetentAuthority' or local-name($curElem)='S02_AccreditationBody' or local-name($curElem)='S02_CertificationAuthExistsDetails' or local-name($curElem)='S02_RegistryAdministrator'">
                    <tr>
                        <th rowspan="2">
                            <xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="'Name'"/></xsl:call-template>
                        </th>
                        <th rowspan="2">
                            <xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="'Abbreviation'"/></xsl:call-template>
                        </th>
                        <th colspan="3">
                            <xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="'Q_2_ContactDetails'"/></xsl:call-template>
                        </th>
                    </tr>
                    <tr>
                        <th>
                            <xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="'Telephone'"/></xsl:call-template>
                        </th>
                        <th>
                            <xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="'Email'"/></xsl:call-template>
                        </th>
                        <th>
                            <xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="'Website'"/></xsl:call-template>
                        </th>
                    </tr>
                </xsl:if>
            </thead>
            <tbody>
                <xsl:apply-templates select="$curElem/QuestionRow|$curElem/FixedQuestion|$curElem/S02_CAFocalPoint|$curElem/ResultRow"/>
                <xsl:if test="$tableType='onerow'">
                    <xsl:for-each
                            select="$schema//xs:element[@name = $curElem/local-name()]/descendant::xs:element">
                        <xsl:variable name="elementName" select="@name"/>
                        <xsl:variable name="elementType" select="@type"/>
                        <xsl:call-template name="getValueTd">
                            <xsl:with-param name="elem" select="$curElem//*[local-name()=$elementName][1]"/>
                            <xsl:with-param name="elementType" select="$elementType"/>
                        </xsl:call-template>
                    </xsl:for-each>
                </xsl:if>
                <xsl:if test="count($curElem/OtherPleaseSpecify) &gt; 0 and string-length(normalize-space(string-join($curElem/OtherPleaseSpecify/descendant::*, ''))) &gt; 0">
                    <xsl:if test="string-length($otherPleaseSpecify) &gt; 0">
                        <tr><td><xsl:attribute name="colspan" select="count(tokenize($colHeaders, '\|'))"/>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$otherPleaseSpecify"/>
                            </xsl:call-template>
                        </td></tr>
                    </xsl:if>
                    <xsl:apply-templates select="$curElem/OtherPleaseSpecify"/>
                </xsl:if>
                <!-- Table 6_6 -->
                <xsl:if test="local-name($curElem) ='InstallationsVisitsWaivedLowEmittersDetail'">
                    <td class="td-1">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S06_InstallationsVisitsWaivedLowEmittersDetail-InstallationsVisitsWaivedLowEmittersDetail'"/>
                        </xsl:call-template>
                    </td>
                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
                <!-- Table 6_10 -->
                <xsl:if test="local-name($curElem) ='AircraftOperatorsVisitsWaivedLowEmittersDetail'">
                    <td class="td-1">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S06_AircraftOperatorsVisitsWaivedLowEmittersDetail-total'"/>
                        </xsl:call-template>
                    </td>
                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
                <!-- Table 7_3 -->
                <xsl:if test="local-name($curElem) ='AircraftOperatorsMandateArt17UseNumber'">
                    <td class="td-1">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'S07_AircraftOperatorsUseArt17Mandate-AircraftOperatorsMandateArt17UseNumber'"/>
                        </xsl:call-template>
                    </td>
                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
                <!-- Table 11_9 -->
                <xsl:if test="local-name($curElem) ='OperatingBanRequestMeasures'">

                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
                <!-- Table 12_1 -->
                <xsl:if test="local-name($curElem) ='LegalNatureOfEmissionAllowance'">

                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
                <!-- Table 12_2 -->
                <xsl:if test="local-name($curElem) ='AccountingTreatmentOfEmissionAllowances'">

                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
                <!-- Table 12_3 -->
                <xsl:if test="local-name($curElem) ='VATdueEmissionAllowancesIssuance'">

                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
                <!-- Table 12_3 -->
                <xsl:if test="local-name($curElem) ='VATdueEmissionAllowancesSecondaryMarkets'">

                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
                <!-- Table 12_3 -->
                <xsl:if test="local-name($curElem) ='ReverseChargeMechanismEmissionAllowances'">

                    <xsl:call-template name="getValueTd">
                        <xsl:with-param name="elem" select="$curElem"/>
                    </xsl:call-template>
                </xsl:if>
            </tbody>
        </table>

    </xsl:template>

    <xsl:template match="QuestionRow|FixedQuestion|OtherPleaseSpecify|ResultRow|S02_CAFocalPoint">
            <xsl:variable name="questionRow" select="."/>
            <xsl:variable name="subQName" select="local-name(..)"/>
            <xsl:if test="string-length(normalize-space(string-join(./descendant::*, ''))) &gt; 0">
                <xsl:if test="./QuestionField = 'NonConformitiesForVerifiers' ">
                    <tr>
                        <th></th>
                        <th>Number of non-conformities</th>
                        <th>Number of non-conformities resolved</th>
                    </tr>
                </xsl:if>
                <tr>
                    <xsl:variable name="questionRowDef" select="$schema//xs:element[@name = $subQName]/descendant::xs:element[@name = local-name($questionRow)]"/>
                    <xsl:for-each
                            select="$questionRowDef//xs:element">

                        <xsl:variable name="elementName" select="@name"/>
                        <xsl:variable name="elementType" select="@type"/>
                        <xsl:variable name="pos" select="position()"/>
                        <xsl:variable name="isOtherPleaseSpecify" select="local-name($questionRow) = 'OtherPleaseSpecify' and $pos=1 and count($questionRowDef//xs:element) + 1 = count($questionRowDef/../xs:element[1]//xs:element)"/>
                        <xsl:call-template name="getValueTd">
                            <xsl:with-param name="elem" select="$questionRow//*[local-name()=$elementName][1]"/>
                            <xsl:with-param name="elementType" select="$elementType"/>
                            <xsl:with-param name="colspan">
                                <xsl:choose>
                                    <xsl:when test="$isOtherPleaseSpecify">2</xsl:when>
                                    <xsl:otherwise>0</xsl:otherwise>
                                </xsl:choose>
                            </xsl:with-param>
                        </xsl:call-template>
                    </xsl:for-each>
                </tr>
            </xsl:if>
    </xsl:template>

    <xsl:template name="getValueTd">
        <xsl:param name="elem"/>
        <xsl:param name="elementType" select="$schema//xs:element[@name = $elem/local-name()][1]/@type"/>
        <xsl:param name="colspan" select="0"/>

        <xsl:variable name="codelistName">
            <xsl:if test="not(starts-with($elementType, 'String') or starts-with($elementType, 'Memo') or starts-with($elementType, 'Decimal')
                or starts-with($elementType, 'Integer')) and count($schema/xs:simpleType[@name = $elementType]//xs:enumeration[@value = $elem]) &gt; 0">
                <xsl:value-of select="$elementType"/>
            </xsl:if>
        </xsl:variable>

        <td>
            <xsl:attribute name="class">
                <xsl:value-of select="concat('value td-',position())"/>
            </xsl:attribute>
            <xsl:if test="$colspan > 0">
                <xsl:attribute name="colspan" select="$colspan"/>
            </xsl:if>
            <xsl:variable name="elemValue">
                <xsl:choose>
                    <xsl:when test="string-length($codelistName) &gt; 0">
                        <!--
                        <xsl:value-of select="$schema/xs:simpleType[@name = $elementType]//xs:enumeration[@value = $elem]/xs:annotation/xs:documentation"/>
                        -->
                        <xsl:call-template name="getLabelInCodelist">
                            <xsl:with-param name="codelistName" select="$codelistName"/>
                            <xsl:with-param name="code" select="$elem"/>
                        </xsl:call-template>
                    </xsl:when>
                    <xsl:when test="$elem/text()='yes'">Yes</xsl:when>
                    <xsl:when test="$elem/text()='no'">No</xsl:when>
                    <!-- detect disabled fields -->
                    <xsl:otherwise><xsl:value-of select="$elem"/></xsl:otherwise>
                </xsl:choose>
            </xsl:variable>
            <xsl:value-of select="$elemValue"/>
        </td>
    </xsl:template>


    <xsl:template name="getLabel" >
        <xsl:param name="labelName"/>
        <!--<xsl:param name="lang" select="'en'"/>-->
        <xsl:variable name="labelValue" select="$labels/*[local-name() = $labelName]"/>
        <xsl:choose>
                <xsl:when test="string-length($labelValue) &gt; 0">
                    <xsl:value-of select="$labelValue"/>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="$labelName"/>
                </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="getLabelInCodelist" >
        <xsl:param name="codelistName"/>
        <xsl:param name="code"/>
        <!--<xsl:param name="lang" select="'en'"/>-->
        <xsl:variable name="labelValue" select="$codelists/child::*[local-name() = $codelistName]/item[code = $code]/label"/>
        <xsl:choose>
            <xsl:when test="string-length($labelValue) &gt; 0">
                <xsl:value-of select="$labelValue"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$code"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="relevantYesNoQuestion">
        <xsl:param name="yesNoElem"/>
        <xsl:param name="yesNoLabel"/>
        <xsl:param name="yesNoElemType" select="'onerow'"/>
        <xsl:param name="yesNoValue"/>
        <xsl:param name="relevantElem"/>
        <xsl:param name="relevantLabel"/>
        <xsl:param name="relevantElemTableHeader" select="''"/>
        <xsl:param name="relevantElem2" select="node()"/>
        <xsl:param name="otherPleaseSpecify" select="''"/>
        <xsl:param name="tabelSpecialHeading" select="''"/>
        <xsl:param name="comment" select="''"/>
        <xsl:param name="comment2" select="''"/>
        <xsl:param name="comment3" select="''"/>

        <xsl:if test="string-length($yesNoLabel) &gt; 0">
            <xsl:variable name="yesNoLabelOutput" >
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="$yesNoLabel"/>
                </xsl:call-template>
            </xsl:variable>
            <xsl:choose>
                <xsl:when test="$yesNoElemType = 'tworows'">
                    <h3><xsl:value-of select="$yesNoLabelOutput"/></h3>
                    <table class="question"><tr><xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="$yesNoElem"/></xsl:call-template></tr></table>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:call-template name="getOneRowTable">
                        <xsl:with-param name="elem" select="$yesNoElem"/>
                        <xsl:with-param
                                name="label"><xsl:value-of select="$yesNoLabelOutput"/></xsl:with-param>
                    </xsl:call-template>
                </xsl:otherwise>
            </xsl:choose>
            <xsl:if test="string-length($comment)  &gt; 0">
                <div class="note">
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="$comment"/>
                    </xsl:call-template>
                </div>
            </xsl:if>
        </xsl:if>
        <xsl:if test="$yesNoElem=$yesNoValue or string-length(normalize-space(string-join($relevantElem/descendant-or-self::*, ''))) &gt; 0">
            <span>
                <xsl:if test="not($yesNoElem=$yesNoValue) and string-length(normalize-space(string-join($relevantElem/descendant-or-self::*, ''))) &gt; 0">
                    <xsl:attribute name="class">disabled</xsl:attribute>
                </xsl:if>
                <xsl:choose>
                    <xsl:when test="$relevantElem/local-name(.) = 'S02_CertificationAuthExistsDetails'">
                        <h4>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$relevantLabel"/>
                            </xsl:call-template>
                        </h4>
                        <xsl:apply-templates select="S02_CertificationAuthExistsDetails"/>
                        <xsl:if test="string-length($comment)  &gt; 0">
                            <div class="note">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="$comment"/>
                                </xsl:call-template>
                            </div>
                        </xsl:if>
                    </xsl:when>
                    <xsl:when test="$relevantElem/local-name(.) = 'S05_MSCustomisedTemplatesDetail1'">
                        <h4><xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="$relevantLabel"/>
                        </xsl:call-template></h4>
                        <xsl:apply-templates select="S05_MSCustomisedTemplatesDetail1"/>
                    </xsl:when>
                    <xsl:when test="$relevantElem/local-name() = 'NumberOfAdditionalAircraftOperators'">
                        <xsl:call-template name="getOneRowTableWithHeader">
                            <xsl:with-param name="elem" select="$relevantElem"/>
                            <xsl:with-param name="label" select="$relevantElemTableHeader"/>
                            <xsl:with-param name="header" select="$relevantLabel"/>
                        </xsl:call-template>
                    </xsl:when>
                    <xsl:when test="$relevantElem/local-name() = 'S05_FallBackApproachAppliedDetail'">
                        <h4><xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="$relevantLabel"/>
                        </xsl:call-template></h4>
                        <xsl:if test="string-length($tabelSpecialHeading) &gt; 0">
                            <h4 class="italicTableHeading"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$tabelSpecialHeading"/>
                            </xsl:call-template></h4>

                        </xsl:if>
                        <xsl:call-template name="getTable">
                            <xsl:with-param name="colHeaders" select="$relevantElemTableHeader"/>
                            <xsl:with-param name="curElem" select="$relevantElem"/>
                            <xsl:with-param name="otherPleaseSpecify" select="$otherPleaseSpecify"/>
                        </xsl:call-template>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_FallBackApproachAppliedDetail-comment'"/>
                            </xsl:call-template>
                        </div>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_FallBackApproachAppliedDetail-comment-2'"/>
                            </xsl:call-template>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_FallBackApproachAppliedDetail-comment-2-a'"/>
                            </xsl:call-template>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_FallBackApproachAppliedDetail-comment-2-b'"/>
                            </xsl:call-template>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_FallBackApproachAppliedDetail-comment-2-c'"/>
                            </xsl:call-template>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_FallBackApproachAppliedDetail-comment-2-d'"/>
                            </xsl:call-template>
                        </div>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_FallBackApproachAppliedDetail-comment-3'"/>
                            </xsl:call-template>
                        </div>
                    </xsl:when>
                    <xsl:when test="$relevantElem/local-name() = 'S05_InherentCarbonTransferredDetail'">
                        <h4><xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="$relevantLabel"/>
                        </xsl:call-template></h4>
                        <xsl:if test="string-length($tabelSpecialHeading) &gt; 0">
                            <h4 class="italicTableHeading"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$tabelSpecialHeading"/>
                            </xsl:call-template></h4>

                        </xsl:if>
                        <xsl:call-template name="getTable">
                            <xsl:with-param name="colHeaders" select="$relevantElemTableHeader"/>
                            <xsl:with-param name="curElem" select="$relevantElem"/>
                            <xsl:with-param name="otherPleaseSpecify" select="$otherPleaseSpecify"/>
                        </xsl:call-template>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_InherentCarbonTransferredDetail-comment-1'"/>
                            </xsl:call-template>
                        </div>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_InherentCarbonTransferredDetail-comment-4'"/>
                            </xsl:call-template>
                        </div>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_InherentCarbonTransferredDetail-comment-2'"/>
                            </xsl:call-template>
                        </div>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_InherentCarbonTransferredDetail-comment-3'"/>
                            </xsl:call-template>
                        </div>

                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_InherentCarbonTransferredDetail-comment-5'"/>
                            </xsl:call-template>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_InherentCarbonTransferredDetail-comment-5-1'"/>
                            </xsl:call-template>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_InherentCarbonTransferredDetail-comment-5-2'"/>
                            </xsl:call-template>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_InherentCarbonTransferredDetail-comment-5-3'"/>
                            </xsl:call-template>

                        </div>

                    </xsl:when>
                    <xsl:when test="$relevantElem/local-name() = 'S05_ContinuousEmissionsMeasurementDetail'">
                        <h4><xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="$relevantLabel"/>
                        </xsl:call-template></h4>
                        <xsl:if test="string-length($tabelSpecialHeading) &gt; 0">
                            <h4 class="italicTableHeading"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$tabelSpecialHeading"/>
                            </xsl:call-template></h4>

                        </xsl:if>
                        <xsl:call-template name="getTable">
                            <xsl:with-param name="colHeaders" select="$relevantElemTableHeader"/>
                            <xsl:with-param name="curElem" select="$relevantElem"/>
                            <xsl:with-param name="otherPleaseSpecify" select="$otherPleaseSpecify"/>
                        </xsl:call-template>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_ContinuousEmissionsMeasurementDetail-comment1'"/>
                            </xsl:call-template>
                        </div>

                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_ContinuousEmissionsMeasurementDetail-comment2'"/>
                            </xsl:call-template>
                        </div>
                    </xsl:when>
                    <xsl:when test="$relevantElem/local-name() = 'S05_SimplifiedMonitoringArt13Detail'">
                        <h4><xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="$relevantLabel"/>
                        </xsl:call-template></h4>
                        <xsl:if test="string-length($tabelSpecialHeading) &gt; 0">
                            <h4 class="italicTableHeading"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$tabelSpecialHeading"/>
                            </xsl:call-template></h4>

                        </xsl:if>
                        <xsl:call-template name="getTable">
                            <xsl:with-param name="colHeaders" select="$relevantElemTableHeader"/>
                            <xsl:with-param name="curElem" select="$relevantElem"/>
                            <xsl:with-param name="otherPleaseSpecify" select="$otherPleaseSpecify"/>
                        </xsl:call-template>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_SimplifiedMonitoringArt13Detail-comment'"/>
                            </xsl:call-template>
                        </div>


                    </xsl:when>
                    <xsl:when test="$relevantElem/local-name() = 'S05_AircraftSimplifiedMonitoringArt13Detail'">
                        <h4><xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="$relevantLabel"/>
                        </xsl:call-template></h4>
                        <xsl:if test="string-length($tabelSpecialHeading) &gt; 0">
                            <h4 class="italicTableHeading"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$tabelSpecialHeading"/>
                            </xsl:call-template></h4>

                        </xsl:if>
                        <xsl:call-template name="getTable">
                            <xsl:with-param name="colHeaders" select="$relevantElemTableHeader"/>
                            <xsl:with-param name="curElem" select="$relevantElem"/>
                            <xsl:with-param name="otherPleaseSpecify" select="$otherPleaseSpecify"/>
                        </xsl:call-template>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S05_AircraftSimplifiedMonitoringArt13Detail-comment'"/>
                            </xsl:call-template>
                        </div>


                    </xsl:when>
                    <xsl:when test="$relevantElem/local-name() = 'S06_InstallationsVerificationReportsIssueDetail'">
                        <h4><xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="$relevantLabel"/>
                        </xsl:call-template></h4>
                        <xsl:if test="string-length($tabelSpecialHeading) &gt; 0">
                            <h4 class="italicTableHeading"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$tabelSpecialHeading"/>
                            </xsl:call-template></h4>

                        </xsl:if>
                        <xsl:call-template name="getTable">
                            <xsl:with-param name="colHeaders" select="$relevantElemTableHeader"/>
                            <xsl:with-param name="curElem" select="$relevantElem"/>
                            <xsl:with-param name="otherPleaseSpecify" select="$otherPleaseSpecify"/>
                        </xsl:call-template>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S06_InstallationsVerificationReportsIssueDetail-comment-2'"/>
                            </xsl:call-template>
                        </div>
                        <div class="note">
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'S06_InstallationsVerificationReportsIssueDetail-comment'"/>
                            </xsl:call-template>
                        </div>

                    </xsl:when>
                    <xsl:when test="string-length($relevantElemTableHeader) > 0">
                        <h4><xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="$relevantLabel"/>
                        </xsl:call-template></h4>
                        <xsl:if test="string-length($tabelSpecialHeading) &gt; 0">
                            <h4 class="italicTableHeading"><xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="$tabelSpecialHeading"/>
                            </xsl:call-template></h4>

                        </xsl:if>
                        <xsl:call-template name="getTable">
                            <xsl:with-param name="colHeaders" select="$relevantElemTableHeader"/>
                            <xsl:with-param name="curElem" select="$relevantElem"/>
                            <xsl:with-param name="otherPleaseSpecify" select="$otherPleaseSpecify"/>
                        </xsl:call-template>

                        <xsl:if test="string-length($comment2)  &gt; 0">
                            <div class="note">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="$comment2"/>
                                </xsl:call-template>
                            </div>
                        </xsl:if>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:call-template name="getTwoRowTable">
                            <xsl:with-param name="elem" select="$relevantElem"/>
                            <xsl:with-param name="label">
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="$relevantLabel"/>
                                    </xsl:call-template>
                            </xsl:with-param>
                        </xsl:call-template>

                    </xsl:otherwise>

                </xsl:choose>

            </span>
        </xsl:if>
        <xsl:if test="$yesNoElem=$yesNoValue or string-length(normalize-space(string-join($relevantElem2/descendant-or-self::*, ''))) &gt; 0">
            <span>
                <xsl:if test="not($yesNoElem=$yesNoValue) and string-length(normalize-space(string-join($relevantElem2/descendant-or-self::*, ''))) &gt; 0">
                    <xsl:attribute name="class">disabled</xsl:attribute>
                </xsl:if>
                <xsl:choose>
                    <xsl:when test="$relevantElem2/local-name(.) = 'S05_MSCustomisedTemplatesDetail2'">
                        <xsl:apply-templates select="S05_MSCustomisedTemplatesDetail2"/>

                            <div class="note">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S05_MSCustomisedTemplatesDetail-comment1'"/>
                                </xsl:call-template>
                            </div>


                            <div class="note">
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'S05_MSCustomisedTemplatesDetail-comment2'"/>
                                </xsl:call-template>
                            </div>

                    </xsl:when>
                </xsl:choose>
            </span>
        </xsl:if>
    </xsl:template>

    <xsl:template name="getTwoRowTable">
        <xsl:param name="label" select="''"/>

        <xsl:param name="elem"/>
        <table class="question second">
            <xsl:if test="string-length($label) &gt; 0">
                <tr><th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="$label"/>
                    </xsl:call-template>
                </th></tr>
            </xsl:if>
            <tr><xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="$elem"/></xsl:call-template></tr>
        </table>

    </xsl:template>

    <xsl:template name="getOneRowTable">
        <xsl:param name="label"/>
        <xsl:param name="elem"/>
        <table class="question">
            <tr><th>
                <xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="$label"/></xsl:call-template>
            </th><xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="$elem"/></xsl:call-template></tr>
        </table>
    </xsl:template>

    <xsl:template name="getOneRowTableWithHeader">
        <xsl:param name="label"/>
        <xsl:param name="elem"/>
        <xsl:param name="header"/>
        <h4><xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="$header"/></xsl:call-template></h4>
        <table class="question">
            <tr>
                <td><xsl:call-template name="getLabel"><xsl:with-param name="labelName" select="$label"/></xsl:call-template></td>
                <xsl:call-template name="getValueTd"><xsl:with-param name="elem" select="$elem"/></xsl:call-template>
            </tr>
        </table>
    </xsl:template>

    <xsl:template match="text()"/>

</xsl:stylesheet>