View stylesheet

XML schemas http://dd.eionet.europa.eu/schemas/habides-2.0/derogations.xsd
Output type EXCEL
Description Excel output
XSL file derogations_habides-excel.xsl (Last modified: 18 Sep 2017 17:06 )
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:number="http://openoffice.org/2000/datastyle"
    xmlns:office="http://openoffice.org/2000/office"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:skos="http://www.w3.org/2004/02/skos/core#"
    xmlns:table="http://openoffice.org/2000/table"
    xmlns:text="http://openoffice.org/2000/text"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0">
    <xsl:output method="xml" />
    <xsl:variable name="delimiter" select="';'" />
    <xsl:variable name="codeDelimiter" select="','" />
    <xsl:variable name="habitatsURL" select="'http://rod.eionet.europa.eu/obligations/268'" />
    <xsl:variable name="birdsURL" select="'http://rod.eionet.europa.eu/obligations/276'" />
    <xsl:template match="/">
        <office:document-content
            xmlns:fo="http://www.w3.org/1999/XSL/Format"
            xmlns:style="http://openoffice.org/2000/style" office:version="1.0">
            <!-- styles definitions -->
            <office:automatic-styles>
                <style:style style:name="defaultCell" style:family="table-cell">
                    <style:properties fo:text-align="left" fo:font-size="10pt" style:column-width="5cm" />
                </style:style>
                <style:style style:name="codeCell" style:family="table-cell">
                    <style:properties fo:text-align="left" fo:font-size="10pt" fo:font-style="italic" fo:color="#848484" style:column-width="5cm" />
                </style:style>
                <style:style style:name="defaultHeading" style:family="table-cell">
                    <style:properties fo:text-align="left" fo:font-size="10pt" fo:font-weight="bold" style:column-width="5cm" style:row-height="2cm" />
                </style:style>
                <style:style style:name="codeHeading" style:family="table-cell">
                    <style:properties fo:text-align="left" fo:font-size="10pt" fo:font-weight="bold" fo:font-style="italic" style:column-width="5cm" style:row-height="2cm" />
                </style:style>
            </office:automatic-styles>
            <!-- create the excel sheet -->
            <office:body>
                <table:table>
                    <xsl:attribute name="table:name">
                        <xsl:text>Derogations</xsl:text>
                    </xsl:attribute>
                    <xsl:call-template name="derogationsHeaders" />
                    <table:table-rows>
                        <xsl:call-template name="derogationsRows" />
                    </table:table-rows>
                </table:table>
            </office:body>
        </office:document-content>
    </xsl:template>
    <!-- template for creating the header row -->
    <xsl:template name="derogationsHeaders">
        <table:table-columns>
            <table:table-column table:default-cell-value-type="string" table:default-cell-style-name="defaultHeading" table:number-columns-repeated="56" />
        </table:table-columns>
        <table:table-header-rows>
            <table:table-row table:default-cell-value-type="string">
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Directive</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Derogation reference</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>User derogation reference</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>User identity</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Species covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Species group covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>This derogation covers all species of birds (Birds)</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>"sensitive" derogation not to be published?</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Derogation valid from (date)</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Derogation valid to (date)</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Authority granting the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Country</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Region(s)</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Location</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Why is this derogation required? (Birds)</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Legal justification for granting the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Further details on the legal justification</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>The application of the derogation is subject to "strictly supervised conditions"</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>The application of the derogation occurs on a "selective basis"</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>The derogation only applies to a "small, limited number" of individuals</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Main activity covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Additional activities covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Further details on the main activities covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Mean, arrangement or method covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Further details on the prohibited means, arrangements or methods covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Modes of transport covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Maximum number of individuals covered by the derogation, during the period covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Maximum number of eggs covered by the derogation, during the period covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Maximum number of nests covered by the derogation, during the period covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Maximum number of breeding sites covered by the derogation, during the period covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Maximum number of resting sites covered by the derogation, during the period covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Maximum number of - Others (unit)</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Maximum number of - No figure can be provided</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Justification, in case no figure can be provided for the maximum number of individuals, eggs, nests, breeding sites, resting sites covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Number of individuals actually affected as a result of the derogation, and during the reporting period covered</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Number of eggs actually affected as a result of the derogation, and during the reporting period covered</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Number of nests actually affected as a result of the derogation, and during the reporting period covered</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Number of breeding sites actually affected as a result of the derogation, and during the reporting period covered</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Number of resting sites actually affected as a result of the derogation, and during the reporting period covered</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Number of - Others (unit)</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Number of - No figure can be provided</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Justification, in case no figure can be provided for the maximum number of individuals, eggs, nests, breeding sites, resting sites covered by the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>I declare that all measures (including supervisory measures) have been taken to ensure that the derogation is fully compliant with the legal requirements under the Bern Convention</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>I declare that all measures (including supervisory measures) have been taken to ensure that the derogation is fully compliant with the legal requirements under the EU Habitats Directive</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>If the population affected by the derogation is endangered or declining, provide evidence that the derogation is not detrimental to the population</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>I declare that there is no other satisfactory alternative to the derogation</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>If appropriate, provide a reference to alternatives rejected</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Controls carried out and results obtained by the controls</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="defaultHeading">
                    <text:p>Comments and notes</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="codeHeading">
                    <text:p>Country [Code]</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="codeHeading">
                    <text:p>Why is this derogation required? (Birds) [Code]</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="codeHeading">
                    <text:p>Legal justification for granting the derogation [Code]</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="codeHeading">
                    <text:p>Main activity covered by the derogation [Code]</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="codeHeading">
                    <text:p>Additional activities covered by the derogation [Code]</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="codeHeading">
                    <text:p>Mean, arrangement or method covered by the derogation [Code]</text:p>
                </table:table-cell>
                <table:table-cell table:style-name="codeHeading">
                    <text:p>Modes of transport covered by the derogation [Code]</text:p>
                </table:table-cell>
            </table:table-row>
        </table:table-header-rows>
    </xsl:template>
    <!-- template for creating the value (derogation data) rows -->
    <xsl:template name="derogationsRows">
        <!-- All derogations -->
        <xsl:for-each select="derogations/derogation">
            <table:table-row table:default-cell-value-type="string">
                <!-- Directive -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:if test="./@directive = $habitatsURL">Habitats</xsl:if>
                        <xsl:if test="./@directive = $birdsURL">Birds</xsl:if>
                    </text:p>
                </table:table-cell>
                <!-- Derogation reference -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="./@derogation_reference" />
                    </text:p>
                </table:table-cell>
                <!-- User derogation reference -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="./@user_derogation_ref" />
                    </text:p>
                </table:table-cell>
                <!-- User identity -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="./@userIdentity" />
                    </text:p>
                </table:table-cell>
                <!-- Species covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./species" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- Species group covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./speciesGroup" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- This derogation covers all species of birds (Birds) -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./coversAllSpecies" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- "sensitive" derogation not to be published? -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./sensitive" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- Derogation valid from (date) -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:choose>
                            <xsl:when test="contains(licenseValidFrom,'T')">
                                <xsl:value-of select="substring-before(licenseValidFrom, 'T')" />
                            </xsl:when>
                            <xsl:otherwise>
                                <xsl:value-of select="licenseValidFrom" />
                            </xsl:otherwise>
                        </xsl:choose>
                    </text:p>
                </table:table-cell>
                <!-- Derogation valid to (date) -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:choose>
                            <xsl:when test="contains(licenseValidUntil,'T')">
                                <xsl:value-of select="substring-before(licenseValidUntil, 'T')" />
                            </xsl:when>
                            <xsl:otherwise>
                                <xsl:value-of select="licenseValidUntil" />
                            </xsl:otherwise>
                        </xsl:choose>
                    </text:p>
                </table:table-cell>
                <!-- Authority granting the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="licensingAuthority" />
                    </text:p>
                </table:table-cell>
                <!-- Country -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getCodelistValue">
                            <xsl:with-param name="code" select="@country" />
                            <xsl:with-param name="codelist" select="'habidescountries'" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- Region(s) -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:for-each select="./regions/region">
                            <xsl:value-of select="." />
                            <xsl:if test="not(position() = last())">
                                <xsl:value-of select="$delimiter" />
                            </xsl:if>
                        </xsl:for-each>
                    </text:p>
                </table:table-cell>
                <!-- Location -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="location" />
                    </text:p>
                </table:table-cell>
                <!-- Why is this derogation required? (Birds) -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:for-each select="./derogationJustifications/derogationJustification">
                            <xsl:call-template name="getCodelistValue">
                                <xsl:with-param name="code" select="." />
                                <xsl:with-param name="codelist" select="'derogationjustification'" />
                            </xsl:call-template>
                            <xsl:if test="not(position() = last())">
                                <xsl:value-of select="$delimiter" />
                            </xsl:if>
                        </xsl:for-each>
                    </text:p>
                </table:table-cell>
                <!-- Legal justification for granting the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:if test="./@directive = $habitatsURL">
                            <xsl:for-each select="./reasons/reason">
                                <xsl:call-template name="getCodelistValue">
                                    <xsl:with-param name="code" select="." />
                                    <xsl:with-param name="codelist" select="'habitatslegalbasis'" />
                                </xsl:call-template>
                                <xsl:if test="not(position() = last())">
                                    <xsl:value-of select="$delimiter" />
                                </xsl:if>
                            </xsl:for-each>
                        </xsl:if>
                        <xsl:if test="./@directive = $birdsURL">
                            <xsl:for-each select="./reasons/reason">
                                <xsl:call-template name="getCodelistValue">
                                    <xsl:with-param name="code" select="." />
                                    <xsl:with-param name="codelist" select="'birdslegalbasis'" />
                                </xsl:call-template>
                                <xsl:if test="not(position() = last())">
                                    <xsl:value-of select="$delimiter" />
                                </xsl:if>
                            </xsl:for-each>
                        </xsl:if>
                    </text:p>
                </table:table-cell>
                <!-- Further details on the legal justification -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="derogationJustificationDetails" />
                    </text:p>
                </table:table-cell>
                <!-- The application of the derogation is subject to "strictly supervised conditions" -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="strictlySupervisedConditions" />
                    </text:p>
                </table:table-cell>
                <!-- The application of the derogation occurs on a "selective basis" -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="selectiveBasis" />
                    </text:p>
                </table:table-cell>
                <!-- The derogation only applies to a "small, limited number" of individuals -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="smallNumberIndividuals" />
                    </text:p>
                </table:table-cell>
                <!-- Main activity covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:if test="./@directive = $habitatsURL">
                            <xsl:call-template name="getCodelistValue">
                                <xsl:with-param name="code" select="./activities/activity" />
                                <xsl:with-param name="codelist" select="'habitatsmainactivities'" />
                            </xsl:call-template>
                        </xsl:if>
                        <xsl:if test="./@directive = $birdsURL">
                            <xsl:call-template name="getCodelistValue">
                                <xsl:with-param name="code" select="./activities/activity" />
                                <xsl:with-param name="codelist" select="'birdsmainactivities'" />
                            </xsl:call-template>
                        </xsl:if>
                    </text:p>
                </table:table-cell>
                <!-- Additional activities covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:if test="./@directive = $habitatsURL">
                            <xsl:for-each select="./additionalActivities/activity">
                                <xsl:call-template name="getCodelistValue">
                                    <xsl:with-param name="code" select="." />
                                    <xsl:with-param name="codelist" select="'habitatsmainactivities'" />
                                </xsl:call-template>
                                <xsl:if test="not(position() = last())">
                                    <xsl:value-of select="$delimiter" />
                                </xsl:if>
                            </xsl:for-each>
                        </xsl:if>
                        <xsl:if test="./@directive = $birdsURL">
                            <xsl:for-each select="./additionalActivities/activity">
                                <xsl:call-template name="getCodelistValue">
                                    <xsl:with-param name="code" select="." />
                                    <xsl:with-param name="codelist" select="'birdsmainactivities'" />
                                </xsl:call-template>
                                <xsl:if test="not(position() = last())">
                                    <xsl:value-of select="$delimiter" />
                                </xsl:if>
                            </xsl:for-each>
                        </xsl:if>
                    </text:p>
                </table:table-cell>
                <!-- Further details on the main activities covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="activitiesFurtherDetails" />
                    </text:p>
                </table:table-cell>
                <!-- Mean, arrangement or method covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:if test="./@directive = $habitatsURL">
                            <xsl:call-template name="getCodelistValue">
                                <xsl:with-param name="code" select="./methods/method" />
                                <xsl:with-param name="codelist" select="'habitatsmethods'" />
                            </xsl:call-template>
                        </xsl:if>
                        <xsl:if test="./@directive = $birdsURL">
                            <xsl:call-template name="getCodelistValue">
                                <xsl:with-param name="code" select="./methods/method" />
                                <xsl:with-param name="codelist" select="'birdsmethods'" />
                            </xsl:call-template>
                        </xsl:if>
                    </text:p>
                </table:table-cell>
                <!-- Further details on the prohibited means, arrangements or methods covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="furtherDetails" />
                    </text:p>
                </table:table-cell>
                <!-- Modes of transport covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:if test="./@directive = $habitatsURL">
                            <xsl:call-template name="getCodelistValue">
                                <xsl:with-param name="code" select="./modesOfTransport/modeOfTransport" />
                                <xsl:with-param name="codelist" select="'habitatsmodesoftransport'" />
                            </xsl:call-template>
                        </xsl:if>
                        <xsl:if test="./@directive = $birdsURL">
                            <xsl:call-template name="getCodelistValue">
                                <xsl:with-param name="code" select="./modesOfTransport/modeOfTransport" />
                                <xsl:with-param name="codelist" select="'birdsmodesoftransport'" />
                            </xsl:call-template>
                        </xsl:if>
                    </text:p>
                </table:table-cell>
                <!-- Maximum number of individuals covered by the derogation, during the period covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="licensed/individuals" />
                    </text:p>
                </table:table-cell>
                <!-- Maximum number of eggs covered by the derogation, during the period covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="licensed/eggs" />
                    </text:p>
                </table:table-cell>
                <!-- Maximum number of nests covered by the derogation, during the period covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="licensed/nests" />
                    </text:p>
                </table:table-cell>
                <!-- Maximum number of breeding sites covered by the derogation, during the period covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="licensed/breeding" />
                    </text:p>
                </table:table-cell>
                <!-- Maximum number of resting sites covered by the derogation, during the period covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="licensed/resting" />
                    </text:p>
                </table:table-cell>
                <!-- Maximum number of - Others (unit) -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="licensed/otherType" />
                    </text:p>
                </table:table-cell>
                <!-- Maximum number of - No figure can be provided -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./licensed/noFigureProvided" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- Justification, in case no figure can be provided for the maximum number of individuals, eggs, nests, breeding sites, resting sites covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="licensed/licensedJustification" />
                    </text:p>
                </table:table-cell>
                <!-- Number of individuals actually affected as a result of the derogation, and during the reporting period covered -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="actuallyTaken/individuals" />
                    </text:p>
                </table:table-cell>
                <!-- Number of eggs actually affected as a result of the derogation, and during the reporting period covered -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="actuallyTaken/eggs" />
                    </text:p>
                </table:table-cell>
                <!-- Number of nests actually affected as a result of the derogation, and during the reporting period covered -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="actuallyTaken/nests" />
                    </text:p>
                </table:table-cell>
                <!-- Number of breeding sites actually affected as a result of the derogation, and during the reporting period covered -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="actuallyTaken/breeding" />
                    </text:p>
                </table:table-cell>
                <!-- Number of resting sites actually affected as a result of the derogation, and during the reporting period covered -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="actuallyTaken/resting" />
                    </text:p>
                </table:table-cell>
                <!-- Number of - Others (unit) -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="actuallyTaken/otherType" />
                    </text:p>
                </table:table-cell>
                <!-- Number of - No figure can be provided -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./actuallyTaken/noFigureProvided" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- Justification, in case no figure can be provided for the maximum number of individuals, eggs, nests, breeding sites, resting sites covered by the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="./actuallyTaken/licensedJustification" />
                    </text:p>
                </table:table-cell>
                <!-- I declare that all measures (including supervisory measures) have been taken to ensure that the derogation is fully compliant with the legal requirements under the Bern Convention -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./allMeasuresTaken" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- I declare that all measures (including supervisory measures) have been taken to ensure that the derogation is fully compliant with the legal requirements under the EU Habitats Directive -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./EUAllMeasuresTaken" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- If the population affected by the derogation is endangered or declining, provide evidence that the derogation is not detrimental to the population -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./detrimentalToPopulation" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- I declare that there is no other satisfactory alternative to the derogation -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./alternativeToDerogation" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- If appropriate, provide a reference to alternatives rejected -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:call-template name="getYesNo">
                            <xsl:with-param name="elem" select="./alternativesAssessed" />
                        </xsl:call-template>
                    </text:p>
                </table:table-cell>
                <!-- Controls carried out and results obtained by the controls -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="supervisoryMeasure" />
                    </text:p>
                </table:table-cell>
                <!-- Comments and notes -->
                <table:table-cell table:style-name="defaultCell">
                    <text:p>
                        <xsl:value-of select="comments" />
                    </text:p>
                </table:table-cell>
                <!-- Country [Code] -->
                <table:table-cell table:style-name="codeCell">
                    <text:p>
                        <xsl:value-of select="@country" />
                    </text:p>
                </table:table-cell>
                <!-- Why is this derogation required? (Birds) [Code] -->
                <table:table-cell table:style-name="codeCell">
                    <text:p>
                        <xsl:for-each select="./derogationJustifications/derogationJustification">
                            <xsl:value-of select="." />
                            <xsl:if test="not(position() = last())">
                                <xsl:value-of select="$codeDelimiter" />
                            </xsl:if>
                        </xsl:for-each>
                    </text:p>
                </table:table-cell>
                <!-- Legal justification for granting the derogation [Code] -->
                <table:table-cell table:style-name="codeCell">
                    <text:p>
                        <xsl:for-each select="./reasons/reason">
                            <xsl:value-of select="." />
                            <xsl:if test="not(position() = last())">
                                <xsl:value-of select="$codeDelimiter" />
                            </xsl:if>
                        </xsl:for-each>
                    </text:p>
                </table:table-cell>
                <!-- Main activity covered by the derogation [Code] -->
                <table:table-cell table:style-name="codeCell">
                    <text:p>
                        <xsl:value-of select="./activities/activity" />
                    </text:p>
                </table:table-cell>
                <!-- Additional activities covered by the derogation [Code] -->
                <table:table-cell table:style-name="codeCell">
                    <text:p>
                        <xsl:for-each select="./additionalActivities/activity">
                            <xsl:value-of select="." />
                            <xsl:if test="not(position() = last())">
                                <xsl:value-of select="$codeDelimiter" />
                            </xsl:if>
                        </xsl:for-each>
                    </text:p>
                </table:table-cell>
                <!-- Mean, arrangement or method covered by the derogation [Code] -->
                <table:table-cell table:style-name="codeCell">
                    <text:p>
                        <xsl:value-of select="./methods/method" />
                    </text:p>
                </table:table-cell>
                <!-- Modes of transport covered by the derogation [Code] -->
                <table:table-cell table:style-name="codeCell">
                    <text:p>
                        <xsl:value-of select="./modesOfTransport/modeOfTransport" />
                    </text:p>
                </table:table-cell>
            </table:table-row>
        </xsl:for-each>
    </xsl:template>
    <!-- template for translating True/False to Yes/No -->
    <xsl:template name="getYesNo">
        <xsl:param name="elem" />
        <xsl:choose>
            <xsl:when test="string($elem)='true'">Yes</xsl:when>
            <xsl:when test="string($elem)='false'">No</xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$elem" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <!-- template for getting DD codelist values -->
    <xsl:template name="getCodelistValue">
        <xsl:param name="code" select="''" />
        <xsl:param name="codelist" />
        <xsl:variable name="habitatslegalBasis" select="'http://dd.eionet.europa.eu/vocabulary/habides/'" />
        <xsl:variable name="habitatslegalBasisCode" select="concat($habitatslegalBasis,$codelist,'/', $code)" />
        <xsl:variable name="habitatslegalBasisURL" select="document(concat('http://dd.eionet.europa.eu/vocabulary/habides/',$codelist ,'/rdf' ))/rdf:RDF" />
        <xsl:choose>
            <xsl:when test="false()" />
            <xsl:otherwise>
                <xsl:value-of select="$habitatslegalBasisURL/skos:Concept[@rdf:about = $habitatslegalBasisCode]/skos:prefLabel[not(@xml:lang)]" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
</xsl:stylesheet>