View stylesheet

XML schema http://biodiversity.eionet.europa.eu/schemas/dir9243eec/habitats.xsd
Output type HTML
Description Html view of habitat type factsheet
XSL file art17-habitats.xsl (Last modified: 02 Jul 2013 09:57 )
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:lookup="http://biodiversity.eionet.europa.eu/art17dataflow"
        version="1.0" exclude-result-prefixes="xml lookup">

    <xsl:output method="xml" indent="yes"
        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
        omit-xml-declaration="yes"/>

<xsl:param name="envelopeurl"/>
<xsl:param name="envelopepath"/>
<xsl:param name="filename"/>

    <xsl:preserve-space elements="published reasons-specify"/>
    <xsl:template match="habitat">
        <html>
            <xsl:attribute name="xml:lang"><xsl:value-of select="@xml:lang" /></xsl:attribute>
            <head>
                <title>Factsheet</title>
                <style type="text/css"><![CDATA[
img {
        border: 2px solid #ccc;
        margin: 10px;
}
h2 {
    font-family: arial, verdana, sans-serif;
}
h1 {
    font-size: 160%;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #999999;
}
body {
        font-size: 80%;
        font-family: verdana, helvetica, arial, sans-serif;
        color: #333;
}
caption {
        display: none;
        font-family: vardana, verdana, helvetica, arial, sans-serif;
        text-align: left;
        font-size: 150%;
}
th {
        background-color:#f6f6f6;
        text-align:left;
        vertical-align: top;
        font-weight: normal;
        color: black;
}
table {
        font-size: 100%;
        border: 1px solid #bbb;
        width: 100%;
        margin: 0 0 2em 0;
}
table table {
        border: 0px solid #bbb;
        margin: 0;
}
th, td {
        font-size: 100%;
        border: 1px solid #bbb;
}
.has_table {
        border: 0px solid #bbb;
        padding: 0;
}
th.header_3 {
    padding: 0.4em 0;
    font-size: 120%;
    font-weight: bold;
}
th.tlabel {
    width: 300px;
}
.header_info {
    margin: 20px 0px;
    padding: 5px;
    font-size: 120%;
    border: 1px dashed #999999;
    background-color: #f0f0f0;
}
.header_info div {
    margin: 5px;
}
]]>
                </style>
            </head>
            <body>
                <h1>Report on the main results of the surveillance under article 11 for annex I habitat types (Annex D)</h1>

                <div class="header_info">
                    <div>CODE: <strong><xsl:value-of select="habitatcode" /></strong></div>
                    <div>NAME: <strong><xsl:value-of select="habitatname" /></strong></div>
                </div>

                <h2>1. National level</h2>
                <p>
                    <xsl:value-of select="regions/@label"/>: <strong><xsl:value-of select="regions"/></strong>
                </p>
                <table>
                    <caption>GIS information</caption>
                    <tbody>
                        <xsl:variable name="habitatpart" select="concat('-',habitatcode,'.gml')"/>
                        <xsl:if test="starts-with($envelopeurl, 'http://') and document(concat($envelopeurl,'/xml'))">
                            <xsl:apply-templates select="document(concat($envelopeurl,'/xml'))/envelope/file[contains(@name, $habitatpart)]"/>
                        </xsl:if>
                    </tbody>
                </table>

                <h2><xsl:value-of select="regional/@label"/></h2>
                <xsl:apply-templates select="regional"/>
            </body>
        </html>
    </xsl:template>

    <xsl:template match="regional">
        <table>
            <caption>Regional level</caption>
            <tbody>
                <xsl:apply-templates select="region"/>
                <xsl:apply-templates select="published"/>
                <xsl:apply-templates select="range"/>
                <xsl:apply-templates select="coverage"/>
                <xsl:apply-templates select="complementary"/>
                <xsl:apply-templates select="conclusion"/>
            </tbody>
        </table>
    </xsl:template>

    <xsl:template match="conclusion-n2000"/>

    <xsl:template match="range|coverage|complementary">
        <tr>
            <th colspan="3" class="header_3">
                <xsl:value-of select="@label"/>
                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text><!-- force rendering of empty cells in IE -->
            </th>
        </tr>
        <xsl:apply-templates/>
    </xsl:template>

    <xsl:template match="conclusion">
        <tr>
            <th class="header_3">
                Conclusion
            </th>
            <th class="header_3">
                Biogeographical or marine level
            </th>
            <th class="header_3">
                <xsl:value-of select="../conclusion-n2000/@label" />
            </th>
        </tr>
        <xsl:apply-templates/>
    </xsl:template>

    <xsl:template match="file">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@title"/> (<xsl:value-of select="@name"/>)
            </th>
            <td colspan="2">
<img src="/Converters/convertDocument?file={$envelopepath}/{@name}&amp;conv=loc_gmltopng_thumb"/>
            </td>
        </tr>
    </xsl:template>

    <xsl:template match="published|reasons-specify">
        <tr>
            <th scope="row">
                <xsl:value-of select="@label"/>
            </th>
            <td class="preserve" colspan="2">
                <xsl:if test="string-length(.)=0">
                    N/A
                </xsl:if>
                <xsl:if test="string-length(.)!=0">
                    <xsl:call-template name="break"><xsl:with-param name="text" select="."/></xsl:call-template>
                </xsl:if>
            </td>
        </tr>
    </xsl:template>

    <xsl:template match="region">
        <tr>
            <xsl:if test="not(@desc)">
                <th>
                     <xsl:value-of select="@label"/>
                     <xsl:variable name="reg" select="." />
                     <a name="{$reg}"></a>

                </th>
                <td colspan="2">
                    <xsl:value-of select="."/><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text><!-- force rendering of empty cells in IE -->
                </td>
            </xsl:if>
            <xsl:if test="@desc!=''">
                <th colspan="3" scope="row">
                    <h3>
                        <xsl:value-of select="@label"/>: <xsl:value-of select="@desc"/>
                         <xsl:variable name="reg" select="." />
                         <a name="{$reg}"></a>

                    </h3>
                </th>
            </xsl:if>
        </tr>
    </xsl:template>

    <xsl:template match="method">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>
            <td colspan="2">
                <xsl:if test="string-length(.)=0">
                    N/A
                </xsl:if>
                <xsl:if test="string-length(.)!=0">
                    <xsl:call-template name="fill-method-multiple">
                        <xsl:with-param name="text" select="."/>
                    </xsl:call-template>
                </xsl:if>
            </td>
        </tr>
    </xsl:template>
    <xsl:template match="quality">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>
            <td colspan="2">
                <xsl:if test="string-length(.)=0">
                    N/A
                </xsl:if>
                <xsl:if test="string-length(.)!=0">
                    <xsl:call-template name="fill-quality">
                        <xsl:with-param name="text" select="."/>
                    </xsl:call-template>
                </xsl:if>
            </td>
        </tr>
    </xsl:template>
    <xsl:template match="trend">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>
            <td colspan="2">
                <xsl:if test="string-length(.)=0">
                    N/A
                </xsl:if>
                <xsl:if test="string-length(.)!=0">
                    <xsl:call-template name="fill-trend">
                        <xsl:with-param name="text" select="."/>
                    </xsl:call-template>
                </xsl:if>
            </td>
        </tr>
    </xsl:template>

    <xsl:template match="reasons">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>
            <td colspan="2">

                <xsl:if test="string-length(.)!=0">
                    <xsl:call-template name="fill-reasons-multiple">
                        <xsl:with-param name="text" select="."/>
                    </xsl:call-template>
                </xsl:if>

                <xsl:if test="string-length(../reasons-specify)!=0">
                    <p>
                        <xsl:value-of select="../reasons-specify"/>
                    </p>
                </xsl:if>
                <xsl:if test="(string-length(.)) + (string-length(../reasons-specify)) =0">
                    <p>
                        N/A
                    </p>
                </xsl:if>
            </td>
        </tr>
    </xsl:template>

    <xsl:template match="threats|pressures">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>
            <td colspan="2">
                <xsl:if test="string-length(.)!=0">
                    <xsl:call-template name="fill-threats-pressures-multiple">
                        <xsl:with-param name="text" select="."/>
                    </xsl:call-template>
                </xsl:if>
                <xsl:if test="string-length(.) = 0">
                    <p>
                        N/A
                    </p>
                </xsl:if>
            </td>
        </tr>
    </xsl:template>

    <xsl:template match="typical-species">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>
            <td colspan="2">
                <xsl:value-of select="speciesname"/>
                <xsl:if test="speciesauthor != ''"> / <xsl:value-of select="speciesauthor"/></xsl:if>
                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text><!-- force rendering of empty cells in IE -->
            </td>
        </tr>
    </xsl:template>

    <xsl:template match="favourable-range">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>
            <td colspan="2">
                <xsl:if test="string-length(@qualifier)!=0">
                    <xsl:call-template name="qualifier-range">
                        <xsl:with-param name="text" select="@qualifier"/>
                    </xsl:call-template>
                </xsl:if>
                <xsl:if test="string-length(@qualifier)!=0 and string-length(.)!=0">&#xA0;</xsl:if>
                <xsl:if test="string-length(.)!=0"><xsl:value-of select="."/></xsl:if>
                <xsl:if test="string-length(@qualifier)=0 and string-length(.) = 0">
                    <p>
                        N/A
                    </p>
                </xsl:if>
            </td>
        </tr>
    </xsl:template>

    <xsl:template match="favourable-area">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>
            <td colspan="2">
                <xsl:if test="string-length(@qualifier)!=0">
                    <xsl:call-template name="qualifier-area">
                        <xsl:with-param name="text" select="@qualifier"/>
                    </xsl:call-template>
                </xsl:if>
                <xsl:if test="string-length(@qualifier)!=0 and string-length(.)!=0">&#xA0;</xsl:if>
                <xsl:if test="string-length(.)!=0"><xsl:value-of select="."/></xsl:if>
                <xsl:if test="string-length(@qualifier)=0 and string-length(.) = 0">
                    <p>
                        N/A
                    </p>
                </xsl:if>
            </td>
        </tr>
    </xsl:template>

    <xsl:template match="*">
        <tr>
            <th scope="row" class="tlabel">
                <xsl:value-of select="@label" disable-output-escaping="yes"/>
            </th>

            <xsl:if test="parent::conclusion and ../../conclusion-n2000">
                <xsl:variable name="nodename" select="name()" />
                <td>
                    <xsl:if test="string-length(.)=0">
                        N/A
                    </xsl:if>
                    <xsl:if test="string-length(.)!=0">
                        <xsl:call-template name="fill-assessment">
                            <xsl:with-param name="text" select="." />
                        </xsl:call-template>
                    </xsl:if>
                </td>
                <td>
                    <xsl:if test="string-length(../../conclusion-n2000/*[name()=$nodename])=0">
                        N/A
                    </xsl:if>
                    <xsl:if test="string-length(../../conclusion-n2000/*[name()=$nodename])!=0">
                        <xsl:call-template name="fill-assessment">
                            <xsl:with-param name="text" select="../../conclusion-n2000/*[name()=$nodename]"/>
                        </xsl:call-template>
                    </xsl:if>
                </td>
            </xsl:if>
            <xsl:if test="not(parent::conclusion and ../../conclusion-n2000)">
                <td colspan="2">
                    <xsl:if test="string-length(.)=0">
                        N/A
                    </xsl:if>
                    <xsl:if test="string-length(.)!=0">
                        <xsl:value-of select="." />
                    </xsl:if>
                </td>
            </xsl:if>
        </tr>
    </xsl:template>

    <!-- Replaces line breaks with <br/> tags -->
    <xsl:template name="break"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="contains($text, '&#10;')">
                <xsl:value-of select="substring-before($text, '&#10;')"/>
                <br/>
                <xsl:call-template name="break">
                    <xsl:with-param name="text" select="substring-after($text, '&#10;')"/>
                </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$text"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <!-- replace the codes with the specific texts -->
    <xsl:template name="fill-method-multiple"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="contains($text, ' ')">
                <xsl:call-template name="fill-method">
                    <xsl:with-param name="text" select="substring-before($text, ' ')"/>
                </xsl:call-template>
                <br /><xsl:text disable-output-escaping="yes"> </xsl:text>
                <xsl:call-template name="fill-method-multiple">
                    <xsl:with-param name="text" select="substring-after($text, ' ')"/>
                </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
                <xsl:call-template name="fill-method">
                    <xsl:with-param name="text" select="$text"/>
                </xsl:call-template>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>


    <!-- replace the codes with the specific texts -->
    <xsl:template name="fill-reasons-multiple"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="contains($text, ' ')">
                <xsl:call-template name="fill-reasons">
                    <xsl:with-param name="text" select="substring-before($text, ' ')"/>
                </xsl:call-template>
                <br /><xsl:text disable-output-escaping="yes"> </xsl:text>
                <xsl:call-template name="fill-reasons-multiple">
                    <xsl:with-param name="text" select="substring-after($text, ' ')"/>
                </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
                <xsl:call-template name="fill-reasons">
                    <xsl:with-param name="text" select="$text"/>
                </xsl:call-template>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="fill-threats-pressures-multiple"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="contains($text, ' ')">
                <xsl:call-template name="fill-threats-pressures">
                    <xsl:with-param name="text" select="substring-before($text, ' ')"/>
                </xsl:call-template>
                <br /><xsl:text disable-output-escaping="yes"> </xsl:text>
                <xsl:call-template name="fill-threats-pressures-multiple">
                    <xsl:with-param name="text" select="substring-after($text, ' ')"/>
                </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
                <xsl:call-template name="fill-threats-pressures">
                    <xsl:with-param name="text" select="$text"/>
                </xsl:call-template>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="fill-reasons"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="$text = 'Unknown'">Unknown</xsl:when>
            <xsl:when test="$text = 'ImprovedKnowledge'">Improved knowledge/more accurate data</xsl:when>
            <xsl:when test="$text = 'ClimateChange'">Climate change</xsl:when>
            <xsl:when test="$text = 'DirectHuman'">Direct human influence (restoration, deterioration, destruction)</xsl:when>
            <xsl:when test="$text = 'IndirectHuman'">Indirect anthropo(zoo)genic influence</xsl:when>
            <xsl:when test="$text = 'NaturalProcesses'">Natural processes</xsl:when>
            <xsl:when test="$text = 'Other'">Other (specify)</xsl:when>
            <xsl:when test="$text = 'NotApplicable'">Not applicable</xsl:when>
            <xsl:otherwise><span style="color:red;"><xsl:value-of select="$text"/></span></xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="fill-method"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="$text = 'GroundSurvey'">Ground based survey (based on field mapping, possibly using stratified random sampling</xsl:when>
            <xsl:when test="$text = 'RemoteSensing'">Based on remote sensing data (possibly including an element of ground truthing)</xsl:when>
            <xsl:when test="$text = 'ExpertOpinion'">Based on expert opinion</xsl:when>
            <xsl:otherwise><span style="color:red;"><xsl:value-of select="$text"/></span></xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="fill-quality"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="$text = 'Good'">Good e.g based on extensive surveys</xsl:when>
            <xsl:when test="$text = 'Moderate'">Moderate e.g. based on partial data with some extrapolation</xsl:when>
            <xsl:when test="$text = 'Poor'">Poor e.g. based on very incomplete data or on expert judgement</xsl:when>
            <xsl:otherwise><span style="color:red;"><xsl:value-of select="$text"/></span></xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="fill-trend"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="$text = '='">Stable (=)</xsl:when>
            <xsl:when test="$text = '+'">Increasing (+)</xsl:when>
            <xsl:when test="$text = '-'">Decreasing (-)</xsl:when>
            <xsl:when test="$text = 'X'">Unknown (X)</xsl:when>
            <xsl:otherwise><span style="color:red;"><xsl:value-of select="$text"/></span></xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="fill-assessment"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="$text = 'FV'">Favourable (FV)</xsl:when>
            <xsl:when test="$text = 'U1+'">Inadequate but improving (U1+)</xsl:when>
            <xsl:when test="$text = 'U1'">Inadequate (U1)</xsl:when>
            <xsl:when test="$text = 'U1-'">Inadequate and deteriorating (U1-)</xsl:when>
            <xsl:when test="$text = 'U2+'">Bad but improving (U2+)</xsl:when>
            <xsl:when test="$text = 'U2'">Bad (U2)</xsl:when>
            <xsl:when test="$text = 'U2-'">Bad and deteriorating (U2-)</xsl:when>
            <xsl:when test="$text = 'XX'">Unknown (XX)</xsl:when>
            <xsl:otherwise><span style="color:red;"><xsl:value-of select="$text"/></span></xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="qualifier-range"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="$text = ''"></xsl:when>
            <xsl:when test="translate($text,'A','a') = 'approximately equal to'">Approximately equal to field 2.3.1</xsl:when>
            <xsl:when test="translate($text,'M','m') = 'more than'">More than field 2.3.1</xsl:when>
            <xsl:when test="translate($text,'M','m') = 'much more than'">Much more than field 2.3.1</xsl:when>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="qualifier-area"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="$text = ''"></xsl:when>
            <xsl:when test="translate($text,'A','a') = 'approximately equal to'">Approximately equal to field 2.4.1</xsl:when>
            <xsl:when test="translate($text,'M','m') = 'more than'">More than field 2.4.1</xsl:when>
            <xsl:when test="translate($text,'M','m') = 'much more than'">Much more than field 2.4.1</xsl:when>
            <xsl:when test="translate($text,'L','l') = 'less than'">Less than field 2.4.1</xsl:when>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="fill-threats-pressures"><xsl:param name="text" select="."/>
        <xsl:choose>
            <xsl:when test="$text = '000'">000 Not applicable</xsl:when>
            <xsl:when test="$text = '100'">100 Cultivation</xsl:when>
            <xsl:when test="$text = '101'">101 - modification of cultivation practices</xsl:when>
            <xsl:when test="$text = '102'">102 - mowing / cutting</xsl:when>
            <xsl:when test="$text = '110'">110 Use of pesticides</xsl:when>
            <xsl:when test="$text = '120'">120 Fertilisation</xsl:when>
            <xsl:when test="$text = '130'">130 Irrigation</xsl:when>
            <xsl:when test="$text = '140'">140 Grazing</xsl:when>
            <xsl:when test="$text = '141'">141 - abandonment of pastoral systems</xsl:when>
            <xsl:when test="$text = '150'">150 Restructuring agricultural land holding</xsl:when>
            <xsl:when test="$text = '151'">151 - removal of hedges and copses</xsl:when>
            <xsl:when test="$text = '160'">160 General Forestry management</xsl:when>
            <xsl:when test="$text = '161'">161 - forest planting</xsl:when>
            <xsl:when test="$text = '162'">162 - artificial planting</xsl:when>
            <xsl:when test="$text = '163'">163 - forest replanting</xsl:when>
            <xsl:when test="$text = '164'">164 - forestry clearance</xsl:when>
            <xsl:when test="$text = '165'">165 - removal of forest undergthreatth</xsl:when>
            <xsl:when test="$text = '166'">166 - removal of dead and dying trees</xsl:when>
            <xsl:when test="$text = '167'">167 - forest exploitation without replanting</xsl:when>
            <xsl:when test="$text = '170'">170 Animal breeding</xsl:when>
            <xsl:when test="$text = '171'">171 - stock feeding</xsl:when>
            <xsl:when test="$text = '180'">180 Burning</xsl:when>
            <xsl:when test="$text = '190'">190 Agriculture and forestry activities not referred to above</xsl:when>
            <xsl:when test="$text = '200'">200 Fish and Shellfish Aquaculture</xsl:when>
            <xsl:when test="$text = '210'">210 Professional fishing</xsl:when>
            <xsl:when test="$text = '211'">211 - fixed location fishing</xsl:when>
            <xsl:when test="$text = '212'">212 - trawling</xsl:when>
            <xsl:when test="$text = '213'">213 - drift-net fishing</xsl:when>
            <xsl:when test="$text = '220'">220 Leisure fishing</xsl:when>
            <xsl:when test="$text = '221'">221 - bait digging</xsl:when>
            <xsl:when test="$text = '230'">230 Hunting</xsl:when>
            <xsl:when test="$text = '240'">240 Taking / Removal of fauna, general</xsl:when>
            <xsl:when test="$text = '241'">241 - collection (insects, reptiles, amphibians.....)</xsl:when>
            <xsl:when test="$text = '242'">242 - taking from nest (falcons)</xsl:when>
            <xsl:when test="$text = '243'">243 - trapping, poisoning, poaching</xsl:when>
            <xsl:when test="$text = '244'">244 - other forms of taking fauna</xsl:when>
            <xsl:when test="$text = '250'">250 Taking / Removal of flora, general</xsl:when>
            <xsl:when test="$text = '251'">251 - pillaging of floristic stations</xsl:when>
            <xsl:when test="$text = '290'">290 Hunting, fishing or collecting activities not referred to above</xsl:when>
            <xsl:when test="$text = '300'">300 Sand and gravel extraction</xsl:when>
            <xsl:when test="$text = '301'">301 - quarries</xsl:when>
            <xsl:when test="$text = '302'">302 - removal of beach materials</xsl:when>
            <xsl:when test="$text = '310'">310 Peat extraction</xsl:when>
            <xsl:when test="$text = '311'">311 - hand cutting of peat</xsl:when>
            <xsl:when test="$text = '312'">312 - mechanical removal of peat</xsl:when>
            <xsl:when test="$text = '320'">320 Exploration and extraction of oil or gas</xsl:when>
            <xsl:when test="$text = '330'">330 Mines</xsl:when>
            <xsl:when test="$text = '331'">331 - open cast mining</xsl:when>
            <xsl:when test="$text = '340'">340 Salt works</xsl:when>
            <xsl:when test="$text = '390'">390 Mining and extraction activities not referred to above</xsl:when>
            <xsl:when test="$text = '400'">400 Urbanised areas, human habitation</xsl:when>
            <xsl:when test="$text = '401'">401 - continuous urbanisation</xsl:when>
            <xsl:when test="$text = '402'">402 - discontinuous urbanisation</xsl:when>
            <xsl:when test="$text = '403'">403 - dispersed habitation</xsl:when>
            <xsl:when test="$text = '409'">409 - other patterns of habitation</xsl:when>
            <xsl:when test="$text = '410'">410 Industrial or commercial areas</xsl:when>
            <xsl:when test="$text = '411'">411 - factory</xsl:when>
            <xsl:when test="$text = '412'">412 - industrial stockage</xsl:when>
            <xsl:when test="$text = '419'">419 - other industrial / commercial areas</xsl:when>
            <xsl:when test="$text = '420'">420 Discharges</xsl:when>
            <xsl:when test="$text = '421'">421 - disposal of household waste</xsl:when>
            <xsl:when test="$text = '422'">422 - disposal of industrial waste</xsl:when>
            <xsl:when test="$text = '423'">423 - disposal of inert materials</xsl:when>
            <xsl:when test="$text = '424'">424 Other discharges</xsl:when>
            <xsl:when test="$text = '430'">430 Agricultural structures</xsl:when>
            <xsl:when test="$text = '440'">440 Storage of materials</xsl:when>
            <xsl:when test="$text = '490'">490 Other urbanisation, industrial and similar activities</xsl:when>
            <xsl:when test="$text = '500'">500 Communication networks</xsl:when>
            <xsl:when test="$text = '501'">501 - paths, tracks, cycling tracks</xsl:when>
            <xsl:when test="$text = '502'">502 - roads, motorways</xsl:when>
            <xsl:when test="$text = '503'">503 - railway lines, TGV</xsl:when>
            <xsl:when test="$text = '504'">504 - port areas</xsl:when>
            <xsl:when test="$text = '505'">505 - airport</xsl:when>
            <xsl:when test="$text = '506'">506 - aerodrome, heliport</xsl:when>
            <xsl:when test="$text = '507'">507 - bridge, viaduct</xsl:when>
            <xsl:when test="$text = '508'">508 - tunnel</xsl:when>
            <xsl:when test="$text = '509'">509 - other communication networks</xsl:when>
            <xsl:when test="$text = '510'">510 Energy transport</xsl:when>
            <xsl:when test="$text = '511'">511 - electricity lines</xsl:when>
            <xsl:when test="$text = '512'">512 - pipe lines</xsl:when>
            <xsl:when test="$text = '513'">513 - other forms of energy transport</xsl:when>
            <xsl:when test="$text = '520'">520 Shipping</xsl:when>
            <xsl:when test="$text = '530'">530 Improved access to site</xsl:when>
            <xsl:when test="$text = '590'">590 Other forms of transportation and communication</xsl:when>
            <xsl:when test="$text = '600'">600 Sport and leisure structures</xsl:when>
            <xsl:when test="$text = '601'">601 - golf course</xsl:when>
            <xsl:when test="$text = '602'">602 - skiing complex</xsl:when>
            <xsl:when test="$text = '603'">603 - stadium</xsl:when>
            <xsl:when test="$text = '604'">604 - circuit, track</xsl:when>
            <xsl:when test="$text = '605'">605 - hippodrome</xsl:when>
            <xsl:when test="$text = '606'">606 - attraction park</xsl:when>
            <xsl:when test="$text = '607'">607 - sports pitch</xsl:when>
            <xsl:when test="$text = '608'">608 - camping and caravans</xsl:when>
            <xsl:when test="$text = '609'">609 - other sport / leisure complexes</xsl:when>
            <xsl:when test="$text = '610'">610 Interpretative centres</xsl:when>
            <xsl:when test="$text = '620'">620 Outdoor sports and leisure activities</xsl:when>
            <xsl:when test="$text = '621'">621 - nautical sports</xsl:when>
            <xsl:when test="$text = '622'">622 - walking, horseriding and non-motorised vehicles</xsl:when>
            <xsl:when test="$text = '623'">623 - motorised vehicles</xsl:when>
            <xsl:when test="$text = '624'">624 - mountaineering, rock climbing, speleology</xsl:when>
            <xsl:when test="$text = '625'">625 - gliding, delta plane, paragliding, ballooning</xsl:when>
            <xsl:when test="$text = '626'">626 - skiing, off-piste</xsl:when>
            <xsl:when test="$text = '629'">629 - other outdoor sports and leisure activities</xsl:when>
            <xsl:when test="$text = '690'">690 Other leisure and tourism impacts not referred to above</xsl:when>
            <xsl:when test="$text = '700'">700 Pollution</xsl:when>
            <xsl:when test="$text = '701'">701 - water pollution</xsl:when>
            <xsl:when test="$text = '702'">702 - air pollution</xsl:when>
            <xsl:when test="$text = '703'">703 - soil pollution</xsl:when>
            <xsl:when test="$text = '709'">709 - other forms or mixed forms of pollution</xsl:when>
            <xsl:when test="$text = '710'">710 Noise nuisance</xsl:when>
            <xsl:when test="$text = '720'">720 Trampling, overuse</xsl:when>
            <xsl:when test="$text = '730'">730 Military manouvres</xsl:when>
            <xsl:when test="$text = '740'">740 Vandalism</xsl:when>
            <xsl:when test="$text = '790'">790 Other pollution or human impacts/activities</xsl:when>
            <xsl:when test="$text = '800'">800 Landfill, land reclamation and drying out, general</xsl:when>
            <xsl:when test="$text = '801'">801 - polderisation</xsl:when>
            <xsl:when test="$text = '802'">802 - reclamation of land from sea, estuary or marsh</xsl:when>
            <xsl:when test="$text = '803'">803 - infilling of ditches, dykes, ponds, pools, marshes or pits</xsl:when>
            <xsl:when test="$text = '810'">810 Drainage</xsl:when>
            <xsl:when test="$text = '811'">811 - management of aquatic and bank vegetation for drainage purposes</xsl:when>
            <xsl:when test="$text = '820'">820 Removal of sediments (mud...)</xsl:when>
            <xsl:when test="$text = '830'">830 Canalisation</xsl:when>
            <xsl:when test="$text = '840'">840 Flooding</xsl:when>
            <xsl:when test="$text = '850'">850 Modification of hydrographic functioning, general</xsl:when>
            <xsl:when test="$text = '851'">851 - modification of marine currents</xsl:when>
            <xsl:when test="$text = '852'">852 - modifying structures of inland water courses</xsl:when>
            <xsl:when test="$text = '853'">853 - management of water levels</xsl:when>
            <xsl:when test="$text = '860'">860 Dumping, depositing of dredged deposits</xsl:when>
            <xsl:when test="$text = '870'">870 Dykes, embankments, artificial beaches, general</xsl:when>
            <xsl:when test="$text = '871'">871 - sea defense or coast protection works</xsl:when>
            <xsl:when test="$text = '890'">890 Other human induced changes in hydraulic conditions</xsl:when>
            <xsl:when test="$text = '900'">900 Erosion</xsl:when>
            <xsl:when test="$text = '910'">910 Silting up</xsl:when>
            <xsl:when test="$text = '920'">920 Drying out</xsl:when>
            <xsl:when test="$text = '930'">930 Submersion</xsl:when>
            <xsl:when test="$text = '940'">940 Natural catastrophes</xsl:when>
            <xsl:when test="$text = '941'">941 - inundation</xsl:when>
            <xsl:when test="$text = '942'">942 - avalanche</xsl:when>
            <xsl:when test="$text = '943'">943 - collapse of terrain, landslide</xsl:when>
            <xsl:when test="$text = '944'">944 - storm, cyclone</xsl:when>
            <xsl:when test="$text = '945'">945 - volcanic activity</xsl:when>
            <xsl:when test="$text = '946'">946 - earthquake</xsl:when>
            <xsl:when test="$text = '947'">947 - tidal wave</xsl:when>
            <xsl:when test="$text = '948'">948 - fire (natural)</xsl:when>
            <xsl:when test="$text = '949'">949 - other natural catastrophes</xsl:when>
            <xsl:when test="$text = '950'">950 Biocenotic evolution</xsl:when>
            <xsl:when test="$text = '951'">951 - drying out / accumulation of organic material</xsl:when>
            <xsl:when test="$text = '952'">952 - eutrophication</xsl:when>
            <xsl:when test="$text = '953'">953 - acidification</xsl:when>
            <xsl:when test="$text = '954'">954 - invasion by a species</xsl:when>
            <xsl:when test="$text = '960'">960 Interspecific faunal relations</xsl:when>
            <xsl:when test="$text = '961'">961 - competition (example: gull/tern)</xsl:when>
            <xsl:when test="$text = '962'">962 - parasitism</xsl:when>
            <xsl:when test="$text = '963'">963 - introduction of disease</xsl:when>
            <xsl:when test="$text = '964'">964 - genetic pollution</xsl:when>
            <xsl:when test="$text = '965'">965 - predation</xsl:when>
            <xsl:when test="$text = '966'">966 - antagonism arising from introduction of species</xsl:when>
            <xsl:when test="$text = '967'">967 - antagonism with domestic animals</xsl:when>
            <xsl:when test="$text = '969'">969 - other forms or mixed forms of interspecific faunal competition</xsl:when>
            <xsl:when test="$text = '970'">970 Interspecific floral relations</xsl:when>
            <xsl:when test="$text = '971'">971 - competition</xsl:when>
            <xsl:when test="$text = '972'">972 - parasitism</xsl:when>
            <xsl:when test="$text = '973'">973 - introduction of disease</xsl:when>
            <xsl:when test="$text = '974'">974 - genetic pollution</xsl:when>
            <xsl:when test="$text = '975'">975 - lack of pollinating agents</xsl:when>
            <xsl:when test="$text = '976'">976 - damage by game species</xsl:when>
            <xsl:when test="$text = '979'">979 - other forms or mixed forms of interspecific floral competition</xsl:when>
            <xsl:when test="$text = '990'">990 Other natural processes</xsl:when>
            <xsl:otherwise><span style="color:red;"><xsl:value-of select="$text"/></span></xsl:otherwise>
        </xsl:choose>
    </xsl:template>


</xsl:stylesheet>