View stylesheet

XML schema http://dd.eionet.europa.eu/schemas/IEDAnnexIIModule4/module4.xsd
Output type EXCEL
Description MS Excel
XSL file IEDAnnexIIModule4-excel.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"
                version="2.0" xmlns:office="http://openoffice.org/2000/office"
                xmlns:table="http://openoffice.org/2000/table" 
                xmlns:text="http://openoffice.org/2000/text" 
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                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="xml"/>

    
    <xsl:variable name="TypeOfPlantCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule4/TypeOfPlantCode/rdf')"/>
    <xsl:variable name="ResultsOfVerificationsCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule4/ResultsOfVerificationsCode/rdf')"/>
    <xsl:variable name="AirPollutingSubstancesCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule4/AirPollutingSubstancesCode/rdf')"/>
    <xsl:variable name="WaterPollutingSubstancesCodeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule4/WaterPollutingSubstancesCode/rdf')"/>
    <xsl:variable name="DerogationTypeURL" select="document('http://dd.eionet.europa.eu/vocabulary/IEDAnnexIIModule4/DerogationType/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/IEDAnnexIIModule4/module4.xsd')/xs:schema"/>
    <xsl:variable name="labelsLanguage" select="IEDModule4/@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, 'IEDAnnexIIModule4-labels-', $labelsLanguage ,'.xml'))">
                <xsl:value-of select="concat($xmlPath, 'IEDAnnexIIModule4-labels-', $labelsLanguage ,'.xml')"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="concat($xmlPath, '/IEDAnnexIIModule4-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: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="replace(($codelistURL/rdf:RDF/skos:Concept/skos:notation[text()= $elem/text()]/../skos:prefLabel/text()),'&amp;','and')"/>
        <!-- <xsl:variable name="codeValue" select="replace($codeValue,'&gt;',' greater than ')"/> -->
        <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="replace($codeValue, '&lt;', ' less than ')"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template match="/IEDModule4">
        <office:document-content xmlns:office="http://openoffice.org/2000/office"
                                 xmlns:table="http://openoffice.org/2000/table" office:version="1.0"
                                 xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:number="http://openoffice.org/2000/datastyle"
                                 xmlns:text="http://openoffice.org/2000/text" xmlns:fo="http://www.w3.org/1999/XSL/Format"
                                 xmlns:style="http://openoffice.org/2000/style">
            <office:automatic-styles>
                <style:style style:name="row-height" style:family="table-cell">
                    <style:properties  style:row-height="2cm" />
                </style:style>
                <style:style style:name="string-cell" style:family="table-cell">
                    <style:properties fo:text-align="left"
                                      fo:font-size="10pt" style:column-width="5cm" />
                </style:style>
                <style:style style:name="long-string-cell" style:family="table-cell">
                    <style:properties fo:text-align="left"
                                      fo:font-size="10pt" style:column-width="15cm" />
                </style:style>
                <style:style style:name="number-cell" style:family="table-cell">
                    <style:properties fo:text-align="right"
                                      fo:font-size="12pt" style:column-width="5cm" />
                </style:style>
                <style:style style:name="long-number-cell" style:family="table-cell">
                    <style:properties fo:text-align="right"
                                      fo:font-size="10pt" style:column-width="10cm" />
                </style:style>
                <style:style style:name="total-number-cell" style:family="table-cell">
                    <style:properties fo:text-align="right" fo:font-weight="bold"
                                      fo:font-size="10pt" style:column-width="5cm" />
                </style:style>
                <style:style style:name="string-heading" style:family="table-cell">
                    <style:properties fo:text-align="left"
                                      fo:font-size="10pt" style:column-width="5cm" fo:font-weight="bold" style:row-height="2cm" />
                </style:style>
                <style:style style:name="long-string-heading" style:family="table-cell">
                    <style:properties fo:text-align="left"
                                      fo:font-size="10pt" style:column-width="10cm" fo:font-weight="bold" />
                </style:style>
                <style:style style:name="cell1" style:family="table-cell">
                    <style:properties fo:text-align="right"
                                      fo:font-size="10pt" style:column-width="5cm" />
                </style:style>
                <style:style style:name="cell2" style:family="table-cell">
                    <style:properties fo:text-align="center"
                                      fo:font-size="12pt" fo:font-style="italic" style:column-width="5cm" />
                </style:style>
                <style:style style:name="Heading" style:family="table-cell">
                    <style:properties fo:text-align="center"
                                      fo:font-size="16pt" fo:font-weight="bold" style:column-width="5cm" style:row-height="3cm"/>
                </style:style>
                <style:style style:name="Heading2" style:family="table-cell">
                    <style:properties fo:text-align="left"
                                      fo:font-size="14pt" fo:font-weight="bold" style:column-width="10cm" style:row-height="2cm"/>
                </style:style>
                <style:style style:name="long-Heading2" style:family="table-cell">
                    <style:properties fo:text-align="left"
                                      fo:font-size="10pt" fo:font-weight="bold" style:column-width="10cm" style:row-height="2cm"/>
                </style:style>
                <style:style style:name="Heading3" style:family="table-cell">
                    <style:properties fo:text-align="left"
                                      fo:font-size="12pt" fo:font-weight="normal" style:column-width="5cm" />
                </style:style>
                <style:style style:name="Heading4" style:family="table-cell">
                    <style:properties fo:text-align="right"
                                      fo:font-size="10pt" fo:font-weight="bold" style:column-width="10cm" />
                </style:style>
            </office:automatic-styles>
            <office:body>
                <table:table>
                    <xsl:attribute name="table:name">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question11-1'"/>
                        </xsl:call-template>
                    </xsl:attribute>
                    <table:table-columns>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                    </table:table-columns>
                    <table:table-rows>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-heading'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"></table:table-row>
                        <table:table-row table:default-cell-value-type="string">
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2-note'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'all-plants'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2a'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-2b'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'plantName'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'cap-bel-2t'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2h'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2i'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2j'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2k'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2c'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'hazardousWaste'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'nonHazardousWaste'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2f'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2e'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'street'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'number'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'town-village'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'postal'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2l'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2m'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2n'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1a'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'results'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1b'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'results'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1c'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'results'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1d'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'results'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <xsl:for-each select="./WasteIncinerationCoIncinaration/Plant">
                            <table:table-row table:default-cell-value-type="string"  >
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_11_1_referenceNumber"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_11_1_referenceIED"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_11_1_plantName"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="./q_11_1_capBelow2Tonnes"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="number-cell" table:value-type="number">
                                    <text:p>
                                        <xsl:value-of select="./q_11_1_permittedWasteCap"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="number-cell" table:value-type="number">
                                    <text:p>
                                        <xsl:value-of select="./q_11_1_permittedHazardousWasteCap"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./ActivePermitPlant/q_11_1_link"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./ActivePermitPlant/q_11_1_permitDate"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="./q_11_1_plantType"/>
                                            <xsl:with-param name="codelistURL" select="$TypeOfPlantCodeURL"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="./q_11_1_hazardousWaste"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="./q_11_1_nonHazardousWaste"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="number-cell" table:value-type="number">
                                    <text:p>
                                        <xsl:value-of select="./q_11_1_latitude"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="number-cell" table:value-type="number">
                                    <text:p>
                                        <xsl:value-of select="./q_11_1_longitude"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./Address/street"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="number-cell" table:value-type="number">
                                    <text:p>
                                        <xsl:value-of select="./Address/streetNumber"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./Address/townVillage"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./Address/postalCode"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="./q_11_1_benefit51_1"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="./q_11_1_benefit51_2"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getYesNoValue">
                                            <xsl:with-param name="elem" select="./q_11_1_benefit51_3"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./ActualOperationConditions/OrganicCarbon/q_11_1_actualConditions"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="./ActualOperationConditions/OrganicCarbon/q_11_1_results"/>
                                            <xsl:with-param name="codelistURL" select="$ResultsOfVerificationsCodeURL"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./ActualOperationConditions/Temperature/q_11_1_actualConditions"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="./ActualOperationConditions/Temperature/q_11_1_results"/>
                                            <xsl:with-param name="codelistURL" select="$ResultsOfVerificationsCodeURL"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./ActualOperationConditions/WasteIncineration/q_11_1_actualConditions"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="./ActualOperationConditions/WasteIncineration/q_11_1_results"/>
                                            <xsl:with-param name="codelistURL" select="$ResultsOfVerificationsCodeURL"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./ActualOperationConditions/AutomaticSystem/q_11_1_actualConditions"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="./ActualOperationConditions/AutomaticSystem/q_11_1_results"/>
                                            <xsl:with-param name="codelistURL" select="$ResultsOfVerificationsCodeURL"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                            </table:table-row>
                        </xsl:for-each>
                    </table:table-rows>
                </table:table>
                <table:table>
                    <xsl:attribute name="table:name">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question11-2a'"/>
                        </xsl:call-template>
                    </xsl:attribute>
                    <table:table-columns>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                    </table:table-columns>
                    <table:table-rows>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-2a'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'plants-ex-2T'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"></table:table-row>
                        <table:table-row table:default-cell-value-type="string">
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                               
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'amountPerYearTotal'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                               
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                               
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                               
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'amountPerYearHazardous'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                               
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                               
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                               
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'amountPerYearNonhazardous'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2a'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2d'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2013
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2014
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2015
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2016
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2013
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2014
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2015
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2016
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2013
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2014
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2015
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2" table:value-type="number">
                                <text:p>
                                    2016
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <xsl:for-each select="./WasteIncinerationCoIncinaration/Plant">
                            <xsl:if test="./q_11_1_capBelow2Tonnes = false()">
                                <table:table-row table:default-cell-value-type="string"  >
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:value-of select="./q_11_1_referenceNumber"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:value-of select="./q_11_1_plantName"/>
                                        </text:p>
                                    </table:table-cell>
                                    <xsl:for-each select="./WasteIncinarated/TotalWaste">
                                        <table:table-cell table:style-name="number-cell" table:value-type="number">
                                            <text:p>
                                                <xsl:value-of select="./q_11_2a_amount"/>
                                            </text:p>
                                        </table:table-cell>
                                    </xsl:for-each>
                                    <xsl:for-each select="./WasteIncinarated/HazardousWaste">
                                        <table:table-cell table:style-name="number-cell" table:value-type="number">
                                            <text:p>
                                                <xsl:value-of select="./q_11_2a_amount"/>
                                            </text:p>
                                        </table:table-cell>
                                    </xsl:for-each>
                                    <xsl:for-each select="./WasteIncinarated/NonHazardousWaste">
                                        <td></td>
                                        <table:table-cell table:style-name="number-cell" table:value-type="number">
                                            <text:p>
                                                <xsl:value-of select="./q_11_2a_amount"/>
                                            </text:p>
                                        </table:table-cell>
                                    </xsl:for-each>
                                </table:table-row>
                            </xsl:if>
                        </xsl:for-each>
                    </table:table-rows>
                </table:table>
                <table:table>
                    <xsl:attribute name="table:name">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question11-2b'"/>
                        </xsl:call-template>
                    </xsl:attribute>
                    <table:table-columns>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                    </table:table-columns>
                    <table:table-rows>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-2b'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'plants-ex-2T'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'accOfRunHours'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >

                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2a'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2d'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'operHours'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'numBreaks'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'infoNoAvail'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'breakdownDur'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'infoNoAvail'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <xsl:for-each select="./WasteIncinerationCoIncinaration/Plant">
                            <xsl:if test="./q_11_1_capBelow2Tonnes = false()">
                                <table:table-row table:default-cell-value-type="string"  >
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:value-of select="./q_11_1_referenceNumber"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:value-of select="./q_11_1_plantName"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="number-cell" table:value-type="number">
                                        <text:p>
                                            <xsl:value-of select="./AccountOfRunningProcess/q_11_2_operationalHours"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="number-cell" table:value-type="number">
                                        <text:p>
                                            <xsl:value-of select="./AccountOfRunningProcess/q_11_2_breakdowns"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:call-template name="getYesNoValue">
                                                <xsl:with-param name="elem" select="./AccountOfRunningProcess/q_11_2_breakDownInfoNotAvailable"/>
                                            </xsl:call-template>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="number-cell" table:value-type="number">
                                        <text:p>
                                            <xsl:value-of select="./AccountOfRunningProcess/q_11_2_cumulativeBreakdown"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:call-template name="getYesNoValue">
                                                <xsl:with-param name="elem" select="./AccountOfRunningProcess/q_11_2_cummulativeBreakDownInfoNotAvailable"/>
                                            </xsl:call-template>
                                        </text:p>
                                    </table:table-cell>
                                </table:table-row>
                            </xsl:if>
                        </xsl:for-each>
                    </table:table-rows>
                </table:table>
                <table:table>
                    <xsl:attribute name="table:name">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question11-2c'"/>
                        </xsl:call-template>
                    </xsl:attribute>
                    <table:table-columns>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                    </table:table-columns>
                    <table:table-rows>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-2c'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'plants-ex-2T-benefits'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >

                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-2c-ii'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-2c-iii'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2a'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2d'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-2c-i'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'airPolSub'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'waterPolSub'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-2c-ii-desc'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-2c-iii-link'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <xsl:for-each select="./WasteIncinerationCoIncinaration/Plant">
                            <xsl:if test="./q_11_1_capBelow2Tonnes = false() and (./q_11_1_benefit51_1='true' or ./q_11_1_benefit51_2='true' or ./q_11_1_benefit51_3='true')">
                                <table:table-row table:default-cell-value-type="string"  >
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:value-of select="./q_11_1_referenceNumber"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:value-of select="./q_11_1_plantName"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:call-template name="getYesNoValue">
                                                <xsl:with-param name="elem" select="./ELVlevel/q_11_2c_1_ELVcompliant"/>
                                            </xsl:call-template>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:for-each select="./ELVlevel/AirPollutants/q_11_2c_2_airPollutant">
                                                    <xsl:call-template name="getCDLValue">
                                                        <xsl:with-param name="elem" select="."/>
                                                        <xsl:with-param name="codelistURL" select="$AirPollutingSubstancesCodeURL"/>
                                                    </xsl:call-template><xsl:text disable-output-escaping="yes">,&#10;</xsl:text>
                                            </xsl:for-each>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:for-each select="./ELVlevel/WaterPollutants/q_11_2c_2_waterPollutant">
                                                <xsl:call-template name="getCDLValue">
                                                    <xsl:with-param name="elem" select="."/>
                                                    <xsl:with-param name="codelistURL" select="$WaterPollutingSubstancesCodeURL"/>
                                                </xsl:call-template><xsl:text disable-output-escaping="yes">,&#10;</xsl:text>
                                            </xsl:for-each>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:value-of select="./ELVlevel/q_11_2c_3_description"/>
                                        </text:p>
                                    </table:table-cell>
                                    <table:table-cell table:style-name="Heading3">
                                        <text:p>
                                            <xsl:value-of select="./ELVlevel/q_11_2c_3_link"/>
                                        </text:p>
                                    </table:table-cell>
                                </table:table-row>
                            </xsl:if>
                        </xsl:for-each>
                    </table:table-rows>
                </table:table>
                <table:table>
                    <xsl:attribute name="table:name">
                        <xsl:call-template name="getLabel">
                            <xsl:with-param name="labelName" select="'question12-heading'"/>
                        </xsl:call-template>
                    </xsl:attribute>
                    <table:table-columns>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                        <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="long-string-heading"></table:table-column>
                    </table:table-columns>
                    <table:table-rows>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-1'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                            <table:table-cell table:style-name="Heading2"></table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-1a'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading3">
                                <text:p>
                                    <xsl:call-template name="getYesNoValue">
                                        <xsl:with-param name="elem" select="./SolventEmissions/q_12_1_reductionSchemeApplied"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >

                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-1b'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'totalNumOfinst'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'numOfInstArt59'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'remarks'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="number-cell" table:value-type="number">
                                <text:p>
                                    <xsl:value-of select="./SolventEmissions/Progress/q_12_1_numberOfInstallations"/>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="number-cell" table:value-type="number">
                                <text:p>
                                    <xsl:value-of select="./SolventEmissions/Progress/q_12_1_numberCovered"/>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading3">
                                <text:p>
                                    <xsl:value-of select="./SolventEmissions/Progress/q_12_1_remarks"/>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >

                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-2'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'eachPlantProvide'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >

                        </table:table-row>
                        <table:table-row table:default-cell-value-type="string"  >
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-2a'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-2b'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'plantName'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2e'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question11-1-2f'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'operatorName'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-2c'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'derogType'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                            <table:table-cell table:style-name="Heading2">
                                <text:p>
                                    <xsl:call-template name="getLabel">
                                        <xsl:with-param name="labelName" select="'question12-2d'"/>
                                    </xsl:call-template>
                                </text:p>
                            </table:table-cell>
                        </table:table-row>
                        <xsl:for-each select="./SolventEmissions/DerogationPlant">
                            <table:table-row table:default-cell-value-type="string"  >
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_12_2_referenceNumber"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_12_2_refNumberIED"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_12_2_plantName"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="number-cell" table:value-type="number">
                                    <text:p>
                                        <xsl:value-of select="./q_12_2_longitude"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="number-cell" table:value-type="number">
                                    <text:p>
                                        <xsl:value-of select="./q_12_2_latitude"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_12_2_operatorName"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_12_2_competentAuthority"/>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:call-template name="getCDLValue">
                                            <xsl:with-param name="elem" select="./q_12_2_derogationType"/>
                                            <xsl:with-param name="codelistURL" select="$DerogationTypeURL"/>
                                        </xsl:call-template>
                                    </text:p>
                                </table:table-cell>
                                <table:table-cell table:style-name="Heading3">
                                    <text:p>
                                        <xsl:value-of select="./q_12_2_justification"/>
                                    </text:p>
                                </table:table-cell>
                            </table:table-row>
                        </xsl:for-each>
                    </table:table-rows>
                </table:table>
                <xsl:apply-templates/>
            </office:body>
        </office:document-content>
    </xsl:template>
</xsl:stylesheet>