View stylesheet

XML schema http://converters.eionet.europa.eu/util/Art17/2012
Output type HTML
Description RedList validate fields (labels)
XSL file art12_validate_fields_redlist.xsl (Last modified: 03 Nov 2013 17:57 )
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   <xsl:template name="getLabelRedlist">
      <xsl:param name="table_name"/>
      <xsl:param name="xml_tag"/>
      <xsl:choose>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'additional_distribution_map'">
            <span class="label">4.4 Additional distribution map</span>
            <span class="optional">(Optional)</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'alternative_speciesname'">
            <span class="label">1.4 Alternative species scientific name</span>
            <span class="optional">(Optional)</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'common_speciesname'">
            <span class="label">1.5 Common name</span>
            <span class="optional">(Optional)</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'country'">
            <span class="label">1.1 Country</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'measure'">
            <span class="label">8.2 Conservation measures</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'pressure_threat'">
            <span class="label">7. Main pressures and threats</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'distribution_map'">
            <span class="label">4.3 Distribution map</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'euringcode'">
            <span class="label">1.2.1 EURING Code</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'further_information'">
            <span class="label">6.4 Sources of further information</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'measures_taken'">
            <span class="label">6.3 Measures and initiatives linked to the SAP / MP / BMS</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'national_plan_adopted'">
            <span class="label">6.2 National plan adopted?</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'plan'">
            <span class="label">6.1 Type of plan</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_additional_info'">
            <span class="label">2.8 Additional information</span>
            <span class="optional">(Optional)</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_date'">
            <span class="label">2.1 Year or period</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_maximum_size'">
            <span class="label">2.2 c) Population size - Maximum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_method'">
            <span class="label">2.4 Method used</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_minimum_size'">
            <span class="label">2.2 b) Population size - Minimum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_quality'">
            <span class="label">2.5 Quality</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_size_unit'">
            <span class="label">2.2 a) Population size - Unit</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_sources'">
            <span class="label">2.6 Sources</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend'">
            <span class="label">3.1.2 Short-term trend, direction</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_additional_info'">
            <span class="label">3.3 Additional information</span>
            <span class="optional">(Optional)</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long'">
            <span class="label">3.2.2 Long-term trend, direction</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long_magnitude_max'">
            <span class="label">3.2.3 b) Long-term trend, magnitude - Maximum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long_magnitude_min'">
            <span class="label">3.2.3 a) Long-term trend, magnitude - Minimum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long_method'">
            <span class="label">3.2.4 Method used</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long_period'">
            <span class="label">3.2.1 Period</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long_quality'">
            <span class="label">3.2.5 Quality</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long_sources'">
            <span class="label">3.2.6 Sources</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_magnitude_max'">
            <span class="label">3.1.3 b) Short-term trend, magnitude - Maximum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_magnitude_min'">
            <span class="label">3.1.3 a) Short-term trend, magnitude - Minimum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_method'">
            <span class="label">3.1.4 Method used</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_period'">
            <span class="label">3.1.1 Period</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_quality'">
            <span class="label">3.1.5 Quality</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_sources'">
            <span class="label">3.1.6 Sources</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_type_of_estimate'">
            <span class="label">2.3 Type of estimate</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_additional_info'">
            <span class="label">4.11 Additional Information</span>
            <span class="optional">(Optional)</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_map'">
            <span class="label">4.5 Range map</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_method'">
            <span class="label">4.7 Method used</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_period'">
            <span class="label">4.1 Year or period</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_quality'">
            <span class="label">4.8 Quality</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_sources'">
            <span class="label">4.9 Sources</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_surface_area'">
            <span class="label">4.6 Range surface area</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend'">
            <span class="label">5.1.2 Short-term trend, direction</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_additional_info'">
            <span class="label">5.3 Additional information</span>
            <span class="optional">(Optional)</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long'">
            <span class="label">5.2.2 Long-term trend, direction</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long_magnitude_max'">
            <span class="label">5.2.3 b) Long-term trend, magnitude - Maximum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long_magnitude_min'">
            <span class="label">5.2.3 a) Long-term trend, magnitude - Minimum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long_method'">
            <span class="label">5.2.4 Method used</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long_period'">
            <span class="label">5.2.1 Period</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long_quality'">
            <span class="label">5.2.5 Quality</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long_sources'">
            <span class="label">5.2.6 Sources</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_magnitude_max'">
            <span class="label">5.1.3 b) Short-term trend, magnitude - Maximum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_magnitude_min'">
            <span class="label">5.1.3 a) Short-term trend, magnitude - Minimum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_method'">
            <span class="label">5.1.4 Method used</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_period'">
            <span class="label">5.1.1 Period</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_quality'">
            <span class="label">5.1.5 Quality</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_sources'">
            <span class="label">5.1.6 Sources</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'season'">
            <span class="label">1.6 Season</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'sensitive_species'">
            <span class="label">4.2 Sensitive species</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'spa_population_max'">
            <span class="label">8.1.1 c) Population size - Maximum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'spa_population_method'">
            <span class="label">8.1.2 Method used</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'spa_population_min'">
            <span class="label">8.1.1 b) Population size - Minimum</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'spa_population_trend'">
            <span class="label">8.1.3 Short-term trend of population size in the SPA network (on the national level)</span>
            <span class="optional">(Optional)</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'spa_population_unit'">
            <span class="label">8.1.1 a) Population size - Unit</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'speciescode'">
            <span class="label">1.2.2 Species code</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'speciesname'">
            <span class="label">1.3 Species scientific name</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'subspecies_name'">
            <span class="label">1.3.1 Sub-specific population</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'broad_evaluation_enhance'">
            <span class="label">8.2.5b Broad Evaluation Enchance</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'broad_evaluation_longterm'">
            <span class="label">8.2.5c Broad Evaluation Long-Term</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'broad_evaluation_maintain'">
            <span class="label">8.2.5a Broad Evaluation Maintain</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'broad_evaluation_noeffect'">
            <span class="label">8.2.5d Broad Evaluation No Effect</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'broad_evaluation_notevaluated'">
            <span class="label">8.2.5f Broad Evaluation Not Evaluated</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'broad_evaluation_unknown'">
            <span class="label">8.2.5e Broad Evaluation Unknown</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'location_both'">
            <span class="label">8.2.4c Location Both</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'location_inside'">
            <span class="label">8.2.4a Location Inside</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'location_outside'">
            <span class="label">8.2.4b Location Outside</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'code'">
            <span class="label">8.2.1 Measure</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'ranking'">
            <span class="label">8.2.3 Ranking</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'type_administrative'">
            <span class="label">8.2.2b Administrative</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'type_contractual'">
            <span class="label">8.2.2c Contractual</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'type_legal'">
            <span class="label">8.2.2a Legal</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'type_oneoff'">
            <span class="label">8.2.2e OneOff</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'type_recurrent'">
            <span class="label">8.2.2d Recurrent</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'location'">
            <span class="label">7 d) Location</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'code'">
            <span class="label">7 a) Pressure/Threat</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'quality'">
            <span class="label">7 c) Quality of impact assessment</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'ranking'">
            <span class="label">7 b) Impact</span>
         </xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'sources'">
            <span class="label">7 e) Sources</span>
         </xsl:when>
      </xsl:choose>
   </xsl:template>
   <xsl:template name="getLookupNameRedlist">
      <xsl:param name="table_name"/>
      <xsl:param name="xml_tag"/>
      <xsl:choose>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'country'">lu_art12_country_code_redlist</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'plan'">lu_type_of_plans</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_method'">lu_methods_used</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_quality'">lu_data_quality</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_size_unit'">lu_population_number</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend'">lu_trend_birds</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long'">lu_trend_birds</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long_method'">lu_methods_used</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_long_quality'">lu_data_quality</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_method'">lu_methods_used</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_trend_quality'">lu_data_quality</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'population_type_of_estimate'">lu_type_of_estimate</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_method'">lu_methods_used</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_quality'">lu_data_quality</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend'">lu_trend_birds</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long'">lu_trend_birds</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long_method'">lu_methods_used</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_long_quality'">lu_data_quality</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_method'">lu_methods_used</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'range_trend_quality'">lu_data_quality</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'season'">lu_season_redlist</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'spa_population_method'">lu_methods_used</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'spa_population_trend'">lu_trend_birds</xsl:when>
         <xsl:when test="$table_name = 'data_birds' and $xml_tag = 'spa_population_unit'">lu_population_number</xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'code'">lu_measures</xsl:when>
         <xsl:when test="$table_name = 'data_bmeasures' and $xml_tag = 'ranking'">lu_ranking</xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'location'">lu_location</xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'code'">lu_threats</xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'quality'">lu_data_quality</xsl:when>
         <xsl:when test="$table_name = 'data_bpressures_threats' and $xml_tag = 'ranking'">lu_ranking</xsl:when>
      </xsl:choose>
   </xsl:template>
</xsl:stylesheet>