View stylesheet

XML schema http://dd.eionet.europa.eu/schemas/IEDAnnexIIModule3/module3.xsd
Output type HTML
Description HTML preview
XSL file IEDAnnexIIModule3-html.xsl (Last modified: 08 Nov 2018 19: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"
    xmlns:skos="http://www.w3.org/2004/02/skos/core#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <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"/>

    <xsl:variable name="AirMonitoringFrequencyCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/AirMonitoringFrequencyCode/rdf')"/>
    <xsl:variable name="AirPollutantsGlassCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/AirPollutantsGlassCode/rdf')"/>
    <xsl:variable name="AirPollutantsIronSteelCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/AirPollutantsIronSteelCode/rdf')"/>
    <xsl:variable name="AveragingPeriodCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/AveragingPeriodCode/rdf')"/>
    <xsl:variable name="BATAELGlassCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/BATAELGlassCode/rdf')"/>
    <xsl:variable name="BATAELIronSteelCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/BATAELIronSteelCode/rdf')"/>
    <xsl:variable name="BATGlassCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/BATGlassCode/rdf')"/>
    <xsl:variable name="BATGlassHeadingCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/BATGlassHeadingCode/rdf')"/>
    <xsl:variable name="BATIronSteelCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/BATIronSteelCode/rdf')"/>
    <xsl:variable name="BATIronSteelHeadingCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/BATIronSteelHeadingCode/rdf')"/>
    <xsl:variable name="CompartmentCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/CompartmentCode/rdf')"/>
    <xsl:variable name="CriteriaCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/CriteriaCode/rdf')"/>
    <xsl:variable name="EQSAirPollutantsGlassCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/EQSAirPollutantsGlassCode/rdf')"/>
    <xsl:variable name="EQSAirPollutantsIronSteelCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/EQSAirPollutantsIronSteelCode/rdf')"/>
    <xsl:variable name="EQSSoilPollutantsCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/EQSSoilPollutantsCode/rdf')"/>
    <xsl:variable name="EQSWaterPollutantsGlassCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/EQSWaterPollutantsGlassCode/rdf')"/>
    <xsl:variable name="EQSWaterPollutantsIronSteelCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/EQSWaterPollutantsIronSteelCode/rdf')"/>
    <xsl:variable name="OtherSituationsCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/OtherSituationsCode/rdf')"/>
    <xsl:variable name="OxygenContentCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/OxygenContentCode/rdf')"/>
    <xsl:variable name="PermitConditionsBasisTypeCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/PermitConditionsBasisTypeCode/rdf')"/>
    <xsl:variable name="ReasonsCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/ReasonsCode/rdf')"/>
    <xsl:variable name="SectorCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/SectorCode/rdf')"/>
    <xsl:variable name="SourceTypeCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/SourceTypeCode/rdf')"/>
    <xsl:variable name="UnitsCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/UnitsCode/rdf')"/>
    <xsl:variable name="WaterMonitoringFrequencyCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/WaterMonitoringFrequencyCode/rdf')"/>
    <xsl:variable name="WaterPollutantsGlassCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/WaterPollutantsGlassCode/rdf')"/>
    <xsl:variable name="WaterPollutantsIronSteelCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule3/WaterPollutantsIronSteelCode/rdf')"/>
    
    <!-- <xsl:variable name="labelsLanguage" select="IEDModule3/@xml:lang"/>
    <xsl:variable name="labels" select="document('module3-labels-en.xml')/labels"/> -->
    

    <xsl:variable name="schema"
                  select="document('http://dd.eionet.europa.eu/schemas/IEDAnnexIIModule3/module3.xsd')/xs:schema"/>
    <xsl:variable name="labelsLanguage" select="IEDModule3/@xml:lang"/>
    <xsl:variable name="xmlPath" select="'https://converterstest.eionet.europa.eu/xmlfile'"/>
    <xsl:variable name="labelsUrl">
        <xsl:choose>
            <xsl:when test="doc-available(concat($xmlPath, 'IEDAnnexIIModule3-labels-', $labelsLanguage ,'.xml'))">
                <xsl:value-of select="concat($xmlPath, 'IEDAnnexIIModule3-labels-', $labelsLanguage ,'.xml')"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="concat($xmlPath, '/IEDAnnexIIModule3-labels-en.xml')"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:variable>
    <xsl:variable name="labels" select="document($labelsUrl)/labels"/>

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


    <xsl:template name="getYesNoValue">
        <xsl:param name="elem"/>
        <!-- <xsl:param name="codelistElement" select="''"/> -->
        <xsl:variable name="elemValue">
            <xsl:choose>
                <xsl:when test="$elem/text()='true'">Yes</xsl:when>
                <xsl:when test="$elem/text()='false'">No</xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="$elem"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <xsl:value-of select="$elemValue"/>
    </xsl:template>

    <xsl:template name="getCDLValue">
        <xsl:param name="elem"/>
        <xsl:param name="codelistURL" />
        <xsl:variable name="codeValue" select="$codelistURL/rdf:RDF/skos:Concept/skos:notation[text()= $elem/text()]/../skos:prefLabel/text()"/>
        <xsl:choose>
            <xsl:when test="codeValue = ''">
                <xsl:value-of disable-output-escaping="yes" select="$elem"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of disable-output-escaping="yes" select="$codeValue"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    
    <xsl:template name="getCDLValueEQS">
        <xsl:param name="elem"/>
        <xsl:variable name="codelistAirPollutantsGlassCodeValue" select="$EQSAirPollutantsGlassCodeURL/rdf:RDF/skos:Concept/skos:notation[text()= $elem/text()]/../skos:prefLabel/text()"/>
        <xsl:variable name="codelistAirPollutantsIronSteelCodeValue" select="$EQSAirPollutantsIronSteelCodeURL/rdf:RDF/skos:Concept/skos:notation[text()= $elem/text()]/../skos:prefLabel/text()"/>
        <xsl:variable name="codelistSoilPollutantsCodeValue" select="$EQSSoilPollutantsCodeURL/rdf:RDF/skos:Concept/skos:notation[text()= $elem/text()]/../skos:prefLabel/text()"/>
        <xsl:variable name="codelistWaterPollutantsGlassCodeValue" select="$EQSWaterPollutantsGlassCodeURL/rdf:RDF/skos:Concept/skos:notation[text()= $elem/text()]/../skos:prefLabel/text()"/>
        <xsl:variable name="codelistWaterPollutantsIronSteelCodeValue" select="$EQSWaterPollutantsIronSteelCodeURL/rdf:RDF/skos:Concept/skos:notation[text()= $elem/text()]/../skos:prefLabel/text()"/>
        <xsl:variable name="all">
            <xsl:value-of select="concat($codelistAirPollutantsGlassCodeValue,',',$codelistAirPollutantsIronSteelCodeValue,',',$codelistSoilPollutantsCodeValue,',',$codelistWaterPollutantsGlassCodeValue,',',$codelistWaterPollutantsGlassCodeValue)"/>
        </xsl:variable>

        <xsl:variable name="tokens" select="tokenize($all, ',')" />
        <xsl:variable name="tokensUnique" select="distinct-values($tokens)" />
        <xsl:variable name="unique">
            <xsl:for-each select="$tokensUnique">
                <xsl:value-of select="."/>
            </xsl:for-each>
        </xsl:variable>
        <xsl:choose>
            <xsl:when test="not(unique = '')">
                <xsl:value-of disable-output-escaping="yes" select="$unique"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of disable-output-escaping="yes" select="$elem"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template match="/">
        <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
            <head>
                <title>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'Questionnaire-title'"/>
                    </xsl:call-template>
                </title>
                <meta content="text/html; charset=utf-8"/>
                <style type="text/css">
                    /*@media print{@page {size: landscape}}*/
                    @page {
                        size: A4;
                        /*margin: 0;*/
                        margin-right: 0.5em;
                        margin-left: 0.5em;
                    }
                    @media print {

                        html, body {
                            width: 210mm;
                            height: 297mm;
                        }
                        @page {size: landscape}
                        table { page : rotated}
                        table{  font-size: 6pt;}
                        th { page-break-inside : avoid }
                        td { page-break-inside : avoid;  white-space: pre-line;}
                        tr { page-break-inside : avoid }
                        /*.table-2{ page-break-inside : avoid}*/
                        #table-3 { display: none; !important}
                        .table-3-print{display: inherit !important}
                        /*.table-3-print{ page-break-inside : avoid !important;}*/
                        .table-3-print, .table-3-print tr , .table-3-print tr td{width: 100% !important;padding-bottom: 1em;}
                        .table-3-print-all, .table-3-print-all table {width: 100% !important; display: inherit !important; }
                        #table-3-main-h2{display: none !important;}
                        h2 { page-break-after : avoid }
                        @page{orphans:4; widows:2;}

                        #table-6 { display: none; !important}
                        .table-6-print{display: inherit !important; padding-bottom: 1em;}

                        th{text-align: center !important;
                            padding: 0;}
                        td{ padding: 0;}

                    }
                    /*@media print{@page {
                        -webkit-transform: rotate(-90deg); -moz-transform:rotate(-90deg);
                        filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
                    }*/
                    #table-3-main-h2{display: inherit;}
                    .table-3-print-all{display: none;}
                    .table-3-print{display: none;}
                    .table-6-print{display: none;}
                    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;
                    }
                    th {
                        background-color: #f9f8f6;
                        text-align: left;
                        vertical-align: bottom;

                    }
                    td{
                        text-align: left;
                        vertical-align: text-top;
                    }
                    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;
                        font-weight: normal;
                        color: #315076;
                    }
                    .value {
                        background-color: #ffffe0;
                    }
                    .disabled td{
                        background-color:lightgrey;
                    }
                    .italicTableHeading{
                        font-style: italic;
                        color: black;
                        margin-left: 1em;
                    }
                    .total {
                        font-weight: bold;
                    }
                    .note{ color: darkblue;}
                    .sub-header{ font-weight: bold;
                        color: #000000;
                        font-size: larger;}
                    .padding-bottom{
                        padding-bottom: 2em;
                    }
                </style>
            </head>
            <body>
                <h1>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'Questionnaire-title'"/>
                    </xsl:call-template>
                </h1>
                <table>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'intro-table-1'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'intro-table-2'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'intro-table-4'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <tr>
                    <td>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'intro-table-5'"/>
                        </xsl:call-template> 3.3
                    </td>
                    <td>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'intro-table-6'"/>
                        </xsl:call-template>
                    </td>
                    <td>
                        <xsl:value-of select="IEDModule3/numberOfGLS_3_3_Installations"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'intro-table-5'"/>
                        </xsl:call-template> 3.4
                    </td>
                    <td>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'intro-table-7'"/>
                        </xsl:call-template>
                    </td>
                    <td>
                        <xsl:value-of select="IEDModule3/numberOfGLS_3_4_Installations"/>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right;" colspan="2">
                        <strong>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'numOfGLSInst'"/>
                            </xsl:call-template>
                        </strong>
                    </td>
                    <td>
                        <xsl:value-of select="IEDModule3/numberOfGLSInstallations"/>
                    </td>
                </tr>
                </table>
                <table>
                    <tr>
                        <th>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-1'"/>
                            </xsl:call-template>
                        </th>
                        <th>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-3'"/>
                            </xsl:call-template>
                        </th>
                        <th>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-4'"/>
                            </xsl:call-template>
                        </th>
                    </tr>
                    <tr>
                        <td>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-5'"/>
                            </xsl:call-template> 1.3
                        </td>
                        <td>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-8'"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="IEDModule3/numberOfIS_1_3_Installations"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-5'"/>
                            </xsl:call-template> 2.1
                        </td>
                        <td>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-9'"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="IEDModule3/numberOfIS_2_1_Installations"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-5'"/>
                            </xsl:call-template> 2.2
                        </td>
                        <td>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-10'"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="IEDModule3/numberOfIS_2_2_Installations"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-5'"/>
                            </xsl:call-template> 5.3.b (iii)
                        </td>
                        <td>
                            <xsl:call-template name="getLabel">
                                <xsl:with-param name="labelName" select="'intro-table-11'"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="IEDModule3/numberOfIS_5_3_Installations"/>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;" colspan="2">
                            <strong>
                                <xsl:call-template name="getLabel">
                                    <xsl:with-param name="labelName" select="'numOfISInst'"/>
                                </xsl:call-template>
                            </strong>
                        </td>
                        <td>
                            <xsl:value-of select="IEDModule3/numberOfISInstallations"/>
                        </td>
                    </tr>
                </table>
                <xsl:apply-templates/>
                <div class="padding-bottom"/>
            </body>
        </html>
    </xsl:template>

    <xsl:template match="IEDModule3/numberOfISInstallations"></xsl:template>
    <xsl:template match="IEDModule3/numberOfIS_1_3_Installations"></xsl:template>
    <xsl:template match="IEDModule3/numberOfIS_2_1_Installations"></xsl:template>
    <xsl:template match="IEDModule3/numberOfIS_2_2_Installations"></xsl:template>
    <xsl:template match="IEDModule3/numberOfIS_5_3_Installations"></xsl:template>
    <xsl:template match="IEDModule3/numberOfGLSInstallations"></xsl:template>
    <xsl:template match="IEDModule3/numberOfGLS_3_3_Installations"></xsl:template>
    <xsl:template match="IEDModule3/numberOfGLS_3_4_Installations"></xsl:template>

    <xsl:template match="IEDModule3/PermitConditionSources">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question4-heading'"/>
            </xsl:call-template>
        </h2>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question4-4.1'"/>
            </xsl:call-template>
        </h3>
        <p>
            <xsl:call-template name="getYesNoValue">
                <xsl:with-param name="elem" select="q_4_1_otherSourceUsed"/>
            </xsl:call-template>
        </p>
        <xsl:if test="q_4_1_otherSourceUsed = true()">
            <table id="table-4-1">
                <tr>
                    <th colspan="3">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question4-4.1.1'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question4-4.1.1-table-1'"/>
                        </xsl:call-template>
                    </th>
                    <th >
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'source'"/>
                        </xsl:call-template>
                    </th>
                    <th >
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'sector'"/>
                        </xsl:call-template>
                    </th>
                </tr>

                <xsl:for-each select="./Source">
                    <tr>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="./q_4_1_typeOfSource"/>
                                <xsl:with-param name="codelistURL" select="$SourceTypeCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="q_4_1_source"/>
                        </td>
                        <td>
                            <ul>
                                <xsl:for-each select="./Sectors/sector">
                                    <li>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="."/>
                                            <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                                        </xsl:call-template>
                                    </li>
                                </xsl:for-each>
                            </ul>
                        </td>
                    </tr>
                </xsl:for-each>
            </table>
            <table>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'add-feedback'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <tr>
                    <td><xsl:value-of select="q_4_1_feedback"/></td>
                </tr>
            </table>     
        </xsl:if>
    </xsl:template>
    
    <!-- Question 5 -->
    <xsl:template match="//EnvironmentalQualityStandards"></xsl:template>
    <xsl:template match="IEDModule3/EnvironmentalQualityStandards[1]">
        
        <div id="question5-heading">
            <h2>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'question5-heading'"/>
                </xsl:call-template>
            </h2>
        </div>
        
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question5-5.1'"/>
            </xsl:call-template>
        </h3>
        
        <table id="question5.1" >
            <tr>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'sector'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'question5-5.1-EQS-1'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'question5-5.1-EQS-2'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'question5-5.1-EQS-3'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'link-to-permit'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'perm-issue-date'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'inst-name'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'latitude'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'longitude'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'add-measures'"/>
                    </xsl:call-template>
                </th>
            </tr>
            
            <xsl:for-each select="//EnvironmentalQualityStandards">
                <tr>
                    <td>
                        <ul>
                                <li>
                                    <xsl:call-template name="getCDLValue">
                                        <xsl:with-param name="elem" select="q_5_1_sector"/>
                                        <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                                    </xsl:call-template>
                                </li>
                        </ul>
                    </td>
                    <td>
                        <ul>
                            <xsl:for-each select="./EnvironmentalCompartments/q_5_1_type">
                                <li>
                                    <xsl:call-template name="getCDLValue">
                                        <xsl:with-param name="elem" select="."/>
                                        <xsl:with-param name="codelistURL" select="$CompartmentCodeURL"/>
                                    </xsl:call-template>
                                </li>
                            </xsl:for-each>
                        </ul>
                    </td>
                    <td>
                        <ul>
                            <xsl:for-each select="./EQSPullutants/q_5_1_pollutant">
                                <!-- <li>
                                    <xsl:call-template name="getCDLValue">
                                        <xsl:with-param name="elem" select="."/>
                                        <xsl:with-param name="codelistURL" select="$EQSAirPollutantsGlassCodeURL"/>
                                    </xsl:call-template>
                                    <xsl:call-template name="getCDLValue">
                                        <xsl:with-param name="elem" select="."/>
                                        <xsl:with-param name="codelistURL" select="$EQSAirPollutantsIronSteelCodeURL"/>
                                    </xsl:call-template>
                                    <xsl:call-template name="getCDLValue">
                                        <xsl:with-param name="elem" select="."/>
                                        <xsl:with-param name="codelistURL" select="$EQSSoilPollutantsCodeURL"/>
                                    </xsl:call-template>
                                    <xsl:call-template name="getCDLValue">
                                        <xsl:with-param name="elem" select="."/>
                                        <xsl:with-param name="codelistURL" select="$EQSWaterPollutantsGlassCodeURL"/>
                                    </xsl:call-template>
                                    <xsl:call-template name="getCDLValue">
                                        <xsl:with-param name="elem" select="."/>
                                        <xsl:with-param name="codelistURL" select="$EQSWaterPollutantsIronSteelCodeURL"/>
                                    </xsl:call-template>
                                </li> -->
                                <li>
                                    <xsl:call-template name="getCDLValueEQS">
                                        <xsl:with-param name="elem" select="."/>
                                    </xsl:call-template>
                                </li>
                            </xsl:for-each>
                        </ul>
                    </td>
                    <td>
                        <xsl:call-template name="getCDLValue">
                            <xsl:with-param name="elem" select="q_5_1_waterReson"/>
                            <xsl:with-param name="codelistURL" select="$ReasonsCodeURL"/>
                        </xsl:call-template>
                    </td>
                    <td>
                        <xsl:value-of select="q_5_1_linkToPermit"/>
                    </td>
                    <td>
                        <xsl:value-of select="q_5_1_permitIssueDate"/>
                    </td>
                    <td>
                        <xsl:value-of select="q_5_1_installationName"/>
                    </td>
                    <td>
                        <xsl:value-of select="q_5_1_latitude"/>
                    </td>
                    <td>
                        <xsl:value-of select="q_5_1_longitude"/>
                    </td>
                    <td>
                        <xsl:value-of select="q_5_1_additionalMeasures"/>
                    </td>
                </tr>
            </xsl:for-each>
        </table>
    </xsl:template>

    <xsl:template match="IEDModule3/StricterPermitConditions">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question5-5.2'"/>
            </xsl:call-template>
        </h3>
        <p>
            <xsl:call-template name="getYesNoValue">
                <xsl:with-param name="elem" select="q_5_2_stricterPermitConditions"/>
            </xsl:call-template>
        </p>
        <xsl:if test="q_5_2_stricterPermitConditions = true()">
            <table id="question5.2">
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'inst-name'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'link-to-permit'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'perm-issue-date'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'latitude'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'longitude'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'sector'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'o-situation'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'i-o-specify'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <xsl:for-each select="./Example">
                    <tr>
                        <td>
                            <xsl:value-of select="q_5_2_installationName"/>
                        </td>
                        <td>
                            <xsl:value-of select="q_5_2_linkToPermit"/>
                        </td>
                        <td>
                            <xsl:value-of select="q_5_2_permitIssueDate"/>
                        </td>
                        <td>
                            <xsl:value-of select="q_5_2_latitude"/>
                        </td>
                        <td>
                            <xsl:value-of select="q_5_2_longitude"/>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_5_2_sector"/>
                                <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_5_2_otherSituation"/>
                                <xsl:with-param name="codelistURL" select="$OtherSituationsCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="q_5_2_otherSituationSpecify"/>
                        </td>
                    </tr>
                </xsl:for-each>
            </table>     
        </xsl:if>
    </xsl:template>

    <!-- Question 6 -->
    <xsl:template match="IEDModule3/PermitConditionsAbsenseBAT">
        <div id="question6-heading">
            <h2>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'question6-heading'"/>
                </xsl:call-template>
            </h2>
        </div>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question6-6.1-6.2'"/>
            </xsl:call-template>
        </h3>
        <p>
            <xsl:call-template name="getYesNoValue">
                <xsl:with-param name="elem" select="q_6_permitConditionsNotInBATc"/>
            </xsl:call-template>
        </p>
        <xsl:if test="q_6_permitConditionsNotInBATc = true()">
            <table id="question6">
                <tr>
                    <th colspan="6"></th>
                    <th colspan="2">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question6-sub-7'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'sector'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question6-sub-2'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question6-sub-3'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question6-sub-4'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question6-sub-5'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question6-sub-6'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question6-sub-7a'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question6-sub-7b'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <xsl:for-each select="./SettingPermitConditions">
                    <tr>
                        <td>
                            <ul>
                                <xsl:for-each select="./Sectors/sector">
                                    <li>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="."/>
                                            <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                                        </xsl:call-template>
                                    </li>
                                </xsl:for-each>
                            </ul>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_6_basisOfPermitConditions"/>
                                <xsl:with-param name="codelistURL" select="$PermitConditionsBasisTypeCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="q_6_procedureDescription"/>
                        </td>
                        <td>
                            <xsl:value-of select="q_6_BATnotDescribed"/>
                        </td>
                        <td>
                            <xsl:value-of select="q_6_explanation"/>
                        </td>
                        <td>
                            <xsl:value-of select="q_6_supplementaryInfo"/>
                        </td>
                        <td>
                            <ul>
                                <xsl:for-each select="./Criteria/criterion">
                                    <li>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="."/>
                                            <xsl:with-param name="codelistURL" select="$CriteriaCodeURL"/>
                                        </xsl:call-template>
                                    </li>
                                </xsl:for-each>
                            </ul>
                        </td>
                        <td>
                            <xsl:value-of select="q_6_criteriaDetails"/>
                        </td>
                    </tr>
                </xsl:for-each>
            </table>     
        </xsl:if>
    </xsl:template>

    <!-- Question 7.1 -->
    <xsl:template match="IEDModule3/DifferentELVs">
        <div id="question7-heading">
            <h2>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'question7-heading'"/>
                </xsl:call-template>
            </h2>
        </div>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question7-7.1'"/>
            </xsl:call-template>
        </h3>
        <p>
            <xsl:call-template name="getYesNoValue">
                <xsl:with-param name="elem" select="q_7_1_article153b_provisionUsed"/>
            </xsl:call-template>
        </p>
        <xsl:if test="q_7_1_article153b_provisionUsed = true()">
            <table id="question7.1">
                <tr>
                    <th colspan="3"></th>
                    <th colspan="7">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-natELV'"/>
                        </xsl:call-template>
                    </th>
                    <th colspan="3">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-examples'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'sector'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-numOfInst'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'inst-name'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-envComp'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-monFreq'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-poll-par'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-diffLev'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'unit'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'av-period'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-RefOxygen'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-values'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-periods'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.1-refCond'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <xsl:for-each select="./Provision_Article_15_3b">
                    <tr>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_sector"/>
                                <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="q_7_1_numOfInstallations"/>
                        </td>
                        <td>
                            <xsl:value-of select="q_7_1_installationName"/>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_environmentalCompartment"/>
                                <xsl:with-param name="codelistURL" select="$CompartmentCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_monitoringFrequency"/>
                                <xsl:with-param name="codelistURL" select="$AirMonitoringFrequencyCodeURL"/>
                            </xsl:call-template>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_monitoringFrequency"/>
                                <xsl:with-param name="codelistURL" select="$WaterMonitoringFrequencyCodeURL"/>
                            </xsl:call-template><br />
                            <i><xsl:value-of select="q_7_1_monitoringFrequencyOther"/></i>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_pollutant"/>
                                <xsl:with-param name="codelistURL" select="$AirPollutantsGlassCodeURL"/>
                            </xsl:call-template>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_pollutant"/>
                                <xsl:with-param name="codelistURL" select="$AirPollutantsIronSteelCodeURL"/>
                            </xsl:call-template>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_pollutant"/>
                                <xsl:with-param name="codelistURL" select="$WaterPollutantsGlassCodeURL"/>
                            </xsl:call-template>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_pollutant"/>
                                <xsl:with-param name="codelistURL" select="$WaterPollutantsIronSteelCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="q_7_1_differingLevel"/>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_unit"/>
                                <xsl:with-param name="codelistURL" select="$UnitsCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_avgPeriod"/>
                                <xsl:with-param name="codelistURL" select="$AveragingPeriodCodeURL"/>
                            </xsl:call-template>
                            <div><i><xsl:value-of select="q_7_1_avgPeriodOther"/></i></div>
                        </td>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_refConditionsOxygen"/>
                                <xsl:with-param name="codelistURL" select="$OxygenContentCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <div><xsl:value-of select="q_7_1_monitoringValues"/></div>
                            <div>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_monitoringUnit"/>
                                <xsl:with-param name="codelistURL" select="$UnitsCodeURL"/>
                            </xsl:call-template>
                            </div>
                        </td>
                        <td>
                            <div><xsl:value-of select="q_7_1_monitoringPeriodsOfTime"/></div>
                            <div>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_monitoringAvgPeriod"/>
                                <xsl:with-param name="codelistURL" select="$AveragingPeriodCodeURL"/>
                            </xsl:call-template>
                            </div>
                         <i><xsl:value-of select="q_7_1_monitoringAvgPeriodOther"/></i>
                        </td>
                        <td>
                            <div><xsl:value-of select="q_7_1_monitoringRefConditions"/></div>
                            <div>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_1_monitoringRefConditionsOxygen"/>
                                <xsl:with-param name="codelistURL" select="$OxygenContentCodeURL"/>
                            </xsl:call-template>
                            </div>
                        </td>
                    </tr>
                </xsl:for-each>
            </table>     
        </xsl:if>
    </xsl:template>

    <!-- Question 7.2 -->
    <xsl:template match="IEDModule3/Derogations">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question7-7.2-1'"/>
            </xsl:call-template>
        </h3>
        <i>
           <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question7-7.2-2'"/>
            </xsl:call-template> 
        </i>
        <br/>
        <i>
           <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question7-7.2-3'"/>
            </xsl:call-template> 
        </i>
        <p style="font-weight:bold;">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question7-7.2a'"/>
            </xsl:call-template>
        </p>
        <p>
            <xsl:call-template name="getYesNoValue">
                <xsl:with-param name="elem" select="q_7_2_derogationsGranted"/>
            </xsl:call-template>
        </p>
        <xsl:if test="q_7_2_derogationsGranted = true()">
            <table>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.2b'"/>
                        </xsl:call-template>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.2c'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <tr>
                    <td>
                        <xsl:value-of select="q_7_2_numOfInstallations"/>
                    </td>
                </tr>
            </table>
            <p style="font-weight:bold;">
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'question7-7.2d'"/>
                </xsl:call-template>
            </p>
            <p style="font-weight:bold;">
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'question7-7.2e'"/>
                </xsl:call-template>
            </p>
            <table>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'link-to-permit'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'perm-issue-date'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <xsl:for-each select="./Derogation_A">
                    <tr>
                        <td>
                            <ul>
                                <xsl:for-each select="./PermitLinks/q_7_2_link">
                                    <li>
                                        <xsl:value-of select="."/>
                                    </li>
                                </xsl:for-each>
                            </ul>
                        </td>
                        <td><xsl:value-of select="q_7_2_permitIssueDate"/></td>
                    </tr>
                </xsl:for-each>
            </table>
            <p style="font-weight:bold;">
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'question7-7.2h'"/>
                </xsl:call-template>
            </p>
            <table>
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'sector'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'inst-name'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'perm-issue-date'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'latitude'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'longitude'"/>
                        </xsl:call-template>
                    </th>
                    <th></th>
                </tr>
                <xsl:for-each select="./Derogation_B">
                    <tr>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                 <xsl:with-param name="elem" select="q_7_2_sector"/>
                                 <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td><xsl:value-of select="q_7_2_installationName"/></td>
                        <td><xsl:value-of select="q_7_2_permitIssueDate"/></td>
                        <td><xsl:value-of select="q_7_2_latitude"/></td>
                        <td><xsl:value-of select="q_7_2_longitude"/></td>
                        <td>
                            <table>
                                <tr>
                                    <th colspan="6"></th>
                                    <th colspan="4">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'actual-elves'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th colspan="1"></th>
                                </tr>
                                <tr>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question7-7.2-emission-sources-benef'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question7-7.2-BAT-concl-heading'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question7-7.2-BAT-concl'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question7-7.2-BAT-emission-levels'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'pollutant'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'compartment'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'level'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'unit'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'av-period'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'ref-cond'"/>
                                        </xsl:call-template>
                                    </th>
                                    <th>
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'trans-period'"/>
                                        </xsl:call-template>
                                    </th>
                                </tr>
                                <xsl:for-each select="./EmissionSource">
                                    <tr>
                                        <td><xsl:value-of select="q_7_2_source"/></td>
                                        <td>
                                            <xsl:if test="../q_7_2_sector = 'GLS'">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_BATheading"/>
                                                    <xsl:with-param name="codelistURL" select="$BATGlassHeadingCodeURL"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                            <xsl:if test="../q_7_2_sector = 'IS'">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_BATheading"/>
                                                    <xsl:with-param name="codelistURL" select="$BATIronSteelHeadingCodeURL"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                        </td>
                                        <td>
                                            <xsl:if test="../q_7_2_sector = 'GLS'">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_BATconclusion"/>
                                                    <xsl:with-param name="codelistURL" select="$BATGlassCodeURL"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                            <xsl:if test="../q_7_2_sector = 'IS'">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_BATconclusion"/>
                                                    <xsl:with-param name="codelistURL" select="$BATIronSteelCodeURL"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                        </td>
                                        <td>
                                            <xsl:if test="../q_7_2_sector = 'GLS'">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_BATAEL"/>
                                                    <xsl:with-param name="codelistURL" select="$BATAELGlassCodeURL"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                            <xsl:if test="../q_7_2_sector = 'IS'">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_BATAEL"/>
                                                    <xsl:with-param name="codelistURL" select="$BATAELIronSteelCodeURL"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                        </td>
                                        <td>
                                            <xsl:if test="../q_7_2_sector = 'GLS'">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_pollutant"/>
                                                    <xsl:with-param name="codelistURL" select="$AirPollutantsGlassCodeURL"/>
                                                </xsl:call-template>
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_pollutant"/>
                                                    <xsl:with-param name="codelistURL" select="$WaterPollutantsGlassCodeURL"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                            <xsl:if test="../q_7_2_sector = 'IS'">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_pollutant"/>
                                                    <xsl:with-param name="codelistURL" select="$AirPollutantsIronSteelCodeURL"/>
                                                </xsl:call-template>
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="SourceSpecification/q_7_2_pollutant"/>
                                                    <xsl:with-param name="codelistURL" select="$WaterPollutantsIronSteelCodeURL"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                        </td>
                                        <td>
                                            <xsl:call-template name="getCDLValue">
                                                <xsl:with-param name="elem" select="SourceSpecification/q_7_2_compartment"/>
                                                <xsl:with-param name="codelistURL" select="$CompartmentCodeURL"/>
                                            </xsl:call-template>
                                        </td>
                                        <td><xsl:value-of select="ActualELV/q_7_2_level"/></td>
                                        <td>
                                            <xsl:call-template name="getCDLValue">
                                                <xsl:with-param name="elem" select="ActualELV/q_7_2_unit"/>
                                                <xsl:with-param name="codelistURL" select="$UnitsCodeURL"/>
                                            </xsl:call-template>
                                        </td>
                                        <td>
                                            <xsl:call-template name="getCDLValue">
                                                <xsl:with-param name="elem" select="ActualELV/q_7_2_avgPeriod"/>
                                                <xsl:with-param name="codelistURL" select="$AveragingPeriodCodeURL"/>
                                            </xsl:call-template>
                                        </td>
                                        <td><xsl:value-of select="ActualELV/q_7_2_refConditions"/></td>
                                        <td>
                                            <xsl:if test="TransitionalPeriod/q_7_2_nextPermitReview != '' and 
 TransitionalPeriod/q_7_2_nextPermitReview = true()">
                                                <xsl:call-template name="getLabel">
                                                    <xsl:with-param name="labelName" select="'next-permit-review'"/>
                                                </xsl:call-template>
                                            </xsl:if>
                                            <xsl:if test="TransitionalPeriod/q_7_2_nextPermitReview != '' and 
 TransitionalPeriod/q_7_2_nextPermitReview = false()">
                                                <xsl:value-of select="TransitionalPeriod/q_7_2_expDate"/>
                                            </xsl:if>
                                        </td>
                                    </tr>
                                </xsl:for-each>
                            </table>
                        </td>
                    </tr>
                </xsl:for-each>
            </table> 
        </xsl:if>
    </xsl:template>

    <!-- Question 7.3 -->
    <xsl:template match="IEDModule3/TemporaryDerogations">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question7-7.3'"/>
            </xsl:call-template>
        </h3>
        <p>
            <xsl:call-template name="getYesNoValue">
                <xsl:with-param name="elem" select="q_7_3_temporaryDerogations"/>
            </xsl:call-template>
        </p>
        <xsl:if test="q_7_3_temporaryDerogations = true()">
            <table id="question7.3">
                <tr>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'sector'"/>
                        </xsl:call-template>
                    </th>
                    <th>
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question7-7.3-table-emerging-techniques'"/>
                        </xsl:call-template>
                    </th>
                </tr>
                <xsl:for-each select="./EmergingTechnique">
                    <tr>
                        <td>
                            <xsl:call-template name="getCDLValue">
                                <xsl:with-param name="elem" select="q_7_3_sector"/>
                                <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                            </xsl:call-template>
                        </td>
                        <td>
                            <xsl:value-of select="q_7_3_description"/>
                        </td>
                    </tr>
                </xsl:for-each>
            </table>     
        </xsl:if>
    </xsl:template>

    <!-- Question 8 -->
    <xsl:template match="IEDModule3/MonitoringFrequencies[1]">
        <div id="question8-heading">
            <h2>
                <xsl:call-template name="getLabel">
                    <xsl:with-param name="labelName" select="'question8-heading'"/>
                </xsl:call-template>
            </h2>
        </div>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question8-8.1'"/>
            </xsl:call-template>
        </h3>
        <xsl:for-each select="//MonitoringFrequencies">
        <span style="font-weight:bold;">
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question8-8.1-selSector'"/>
            </xsl:call-template>
        </span>
        <span style="display:inline-block;">
            <ul>
                
                    <li>
                        <xsl:call-template name="getCDLValue">
                            <xsl:with-param name="elem" select="q_8_1_sector"/>
                            <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                        </xsl:call-template>
                    </li>
                
            </ul>
        </span>
        <table id="question8">
            <xsl:for-each select="./EmissionType">
                <xsl:if test="q_8_1_emissionType != ''">
                <tr>
                    <td>
                        <table>
                            <tr>
                                <th>
                                    <xsl:if test="q_8_1_emissionType = '1AIR'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1a'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '2W'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1b'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '3SL'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1c'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '4GW'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1d'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '5O'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1e'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    <xsl:if test="q_8_1_emissionType = '1AIR'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="../q_8_1_airEmission"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '2W'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="../q_8_1_waterEmission"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '3SL'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="../q_8_1_groundWaterEmission"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '4GW'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="../q_8_1_soilEmission"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '5O'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="../q_8_1_otherParameters"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td>
                        <table>
                            <tr>
                                <th>
                                    <xsl:if test="q_8_1_emissionType = '1AIR'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1a-b-options-1'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '2W'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1a-b-options-1'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '3SL'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1c-d-options-1'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '4GW'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1c-d-options-1'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '5O'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1e-options-1'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    <xsl:if test="q_8_1_emissionType = '1AIR'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="q_8_1_frequenciesUsed"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '2W'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="q_8_1_frequenciesUsed"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '3SL'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="q_8_1_frequenciesUsed"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '4GW'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="q_8_1_frequenciesUsed"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '5O'">
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="q_8_1_frequenciesUsed"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td>
                        <table>
                            <tr>
                                <th>
                                    <xsl:if test="q_8_1_emissionType = '1AIR'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1a-b-options-2'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '2W'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1a-b-options-2'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '3SL'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1c-d-options-2'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '4GW'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1c-d-options-2'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '5O'">
                                        <xsl:call-template name="getLabel">
                                            <xsl:with-param name="labelName" select="'question8-8.1e-options-2'"/>
                                        </xsl:call-template>
                                    </xsl:if>
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    <xsl:if test="q_8_1_emissionType = '1AIR'">
                                        <xsl:value-of select="q_8_1_numOfInstallations"/>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '2W'">
                                        <xsl:value-of select="q_8_1_numOfInstallations"/>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '3SL'">
                                        <xsl:value-of select="q_8_1_numOfInstallations"/>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '4GW'">
                                        <xsl:value-of select="q_8_1_numOfInstallations"/>
                                    </xsl:if>
                                    <xsl:if test="q_8_1_emissionType = '5O'">
                                        <xsl:value-of select="q_8_1_numOfInstallations"/>
                                    </xsl:if>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                </xsl:if>
            </xsl:for-each>
        </table>
    </xsl:for-each>
    </xsl:template>
    <xsl:template match="IEDModule3/MonitoringFrequencies[2]"></xsl:template>
    <xsl:template match="IEDModule3/MonitoringBATUsage">
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question8-8.2'"/>
            </xsl:call-template>
        </h3>
        <table id="question8.2">
            <tr>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'sector'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'description'"/>
                    </xsl:call-template>
                </th>
            </tr>
            <xsl:for-each select="./BATUsageDescription">
                <tr>
                    <td>
                        <xsl:call-template name="getCDLValue">
                            <xsl:with-param name="elem" select="sector"/>
                            <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                        </xsl:call-template>
                    </td>
                    <td>
                        <xsl:value-of select="description"/>
                    </td>
                </tr>
            </xsl:for-each>
        </table>
    </xsl:template>
    
    <!-- question 9 -->
    <xsl:template match="//PermitReconsiderations"></xsl:template>
    <xsl:template match="//PermitReconsiderations[1]">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question9-heading'"/>
            </xsl:call-template>
        </h2>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question9-9.1'"/>
            </xsl:call-template>
        </h3>
        <table id="question9">
            <tr>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'sector'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'inst-name'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'latitude'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'longitude'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'question9-9.1-link-to-active-permit'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'perm-issue-date'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'question9-9.1-reasons'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'question9-9.1-date'"/>
                    </xsl:call-template>
                </th>
                <th>
                    <xsl:call-template name="getLabel">
                        <xsl:with-param name="labelName" select="'question9-9.1-comments'"/>
                    </xsl:call-template>
                </th>
            </tr>
            <xsl:for-each select="//PermitReconsiderations">
                <tr>
                    <td>
                        <ul>
                            <xsl:for-each select="./Sectors/sector">
                                <li>
                                    <xsl:call-template name="getCDLValue">
                                        <xsl:with-param name="elem" select="."/>
                                        <xsl:with-param name="codelistURL" select="$SectorCodeURL"/>
                                    </xsl:call-template>
                                </li>
                            </xsl:for-each>
                        </ul>
                    </td>
                    <td><xsl:value-of select="q_9_installationName"/></td>
                    <td><xsl:value-of select="q_9_latitude"/></td>
                    <td><xsl:value-of select="q_9_longitude"/></td>
                    <td><xsl:value-of select="q_9_linkToPermit"/></td>
                    <td><xsl:value-of select="q_9_permitIssueDate"/></td>
                    <td><xsl:value-of select="q_9_reasons"/></td>
                    <td><xsl:value-of select="q_9_dateReconsideration"/></td>
                    <td><xsl:value-of select="q_9_comments"/></td>
                </tr>
            </xsl:for-each>
            
        </table>
    </xsl:template>

    <!-- question 10 -->
    <xsl:template match="IEDModule3/q_10_feedback">
        <h2>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question10-heading'"/>
            </xsl:call-template>
        </h2>
        <h3>
            <xsl:call-template name="getLabel">
                <xsl:with-param name="labelName" select="'question10-10.1'"/>
            </xsl:call-template>
        </h3>
        <p><xsl:value-of select="."/></p>
    </xsl:template>
</xsl:stylesheet>