<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:include schemaLocation="datatypes.xsd" />
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
  <xs:annotation><xs:documentation>Habitats Directive Article 17 Reporting. XML Schema for Species report.</xs:documentation></xs:annotation>
  <xs:element name="species_reports">
    <xs:annotation>
      <xs:documentation>Root element for Species reports. Contains 1 or multiple reports.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="species_report" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute ref="xml:lang" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="species_report">
    <xs:annotation><xs:documentation>Element for Species report</xs:documentation></xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <!-- 1. General information -->
        <xs:element name="country" type="CountryArt17Type"/>
        <xs:element name="speciescode" type="SpeciesCodeType"/>
        <xs:element name="speciesname" type="String255Type"/>
        <xs:element name="alternative_speciesname" type="String255Type"/>
        <xs:element name="common_speciesname" type="String255Type"/>
        <!-- 2. Maps -->
        <xs:element name="sensitive_species" type="BooleanSimpleType"/>
        <xs:element name="distribution_date" type="YearOrPeriodType"/>
        <xs:element name="distribution_map" type="BooleanSimpleType"/>
        <xs:element name="distribution_method" type="String100Type"/>
        <xs:element name="additional_distribution_map" type="BooleanSimpleType"/>
        <!-- 3. Annex V Species -->
        <xs:element name="annexV_species">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="wild_takings" type="BooleanSimpleType" />
              <xs:element name="measures_access" type="BooleanSimpleType" />
              <xs:element name="measures_prohibitions" type="BooleanSimpleType" />
              <xs:element name="measures_periods" type="BooleanSimpleType" />
              <xs:element name="measures_rules" type="BooleanSimpleType" />
              <xs:element name="measures_licences" type="BooleanSimpleType" />
              <xs:element name="measures_trading_legislation" type="BooleanSimpleType" />
              <xs:element name="measures_conservation_propagation" type="BooleanSimpleType" />
              <xs:element name="measures_other" type="BooleanSimpleType" />
              <xs:element name="measures_other_info" type="StringSimpleType" />
              <xs:element name="huntingbag_unit" type="String50Type" />
              <xs:element name="huntingbag_y1_min" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y1_max" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y1_unknown" type="BooleanSimpleType" />
              <xs:element name="huntingbag_y2_min" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y2_max" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y2_unknown" type="BooleanSimpleType" />
              <xs:element name="huntingbag_y3_min" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y3_max" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y3_unknown" type="BooleanSimpleType" />
              <xs:element name="huntingbag_y4_min" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y4_max" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y4_unknown" type="BooleanSimpleType" />
              <xs:element name="huntingbag_y5_min" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y5_max" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y5_unknown" type="BooleanSimpleType" />
              <xs:element name="huntingbag_y6_min" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y6_max" type="PositiveDecimalSimpleType" />
              <xs:element name="huntingbag_y6_unknown" type="BooleanSimpleType" />
              <xs:element name="huntingbag_method" type="String100Type" />
              <xs:element name="annexV_info" type="StringSimpleType" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <!-- Information about biogeographical region - Complete for each biogeographical region or marine region concerned -->
        <xs:element name="regional">
          <xs:complexType>
            <xs:sequence>
              <!-- 4. Biogeographical and marine regions -->
              <xs:element name="region" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:annotation><xs:documentation>Information about biogeographical region - Complete for each biogeographical region or marine region concerned</xs:documentation></xs:annotation>
                  <xs:sequence>
                  <xs:element name="code" type="String10Type"/>
                  <xs:element name="published" type="StringSimpleType"/>
                  <!-- 5. Range -->
                  <xs:element name="range_surface_area" type="PositiveDecimalSimpleType"/>
                  <xs:element name="range_trend_period" type="PeriodType"/>
                  <xs:element name="range_trend" type="String15Type"/>
                  <xs:element name="range_trend_magnitude_min" type="PositiveDecimalSimpleType"/>
                  <xs:element name="range_trend_magnitude_max" type="PositiveDecimalSimpleType"/>
                  <xs:element name="range_trend_method" type="String100Type"/>
                  <xs:element name="range_trend_long_period" type="PeriodType"/>
                  <xs:element name="range_trend_long" type="String15Type"/>
                  <xs:element name="range_trend_long_magnitude_min" type="PositiveDecimalSimpleType"/>
                  <xs:element name="range_trend_long_magnitude_max" type="PositiveDecimalSimpleType"/>
                  <xs:element name="range_trend_long_method" type="String100Type"/>
                  <xs:element name="complementary_favourable_range" type="PositiveDecimalSimpleType"/>
                  <xs:element name="complementary_favourable_range_op" type="String10Type"/>
                  <xs:element name="complementary_favourable_range_unknown" type="String01Type"/>
                  <xs:element name="complementary_favourable_range_method" type="StringSimpleType"/>
                  <xs:element name="range_reasons_for_change" type="DataChangeType"/>
                  <xs:element name="range_info" type="StringSimpleType"/>
                  <!-- 6. Population -->
                  <xs:element name="population_date" type="YearOrPeriodType"/>
                  <xs:element name="population_size_unit" type="String50Type"/>
                  <xs:element name="population_size_min" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_size_max" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_size" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_estimate_type" type="String25Type"/>
                  <xs:element name="population_alt_size_unit" type="String50Type"/>
                  <xs:element name="population_alt_size_min" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_alt_size_max" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_alt_size" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_alt_estimate_type" type="String25Type"/>
                  <xs:element name="population_method" type="String100Type"/>
                  <xs:element name="population_trend_period" type="PeriodType"/>
                  <xs:element name="population_trend" type="String15Type"/>
                  <xs:element name="population_trend_magnitude_min" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_trend_magnitude_max" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_trend_magnitude_ci" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_trend_method" type="String100Type"/>
                  <xs:element name="population_trend_long_period" type="PeriodType"/>
                  <xs:element name="population_trend_long" type="String15Type"/>
                  <xs:element name="population_trend_long_magnitude_min" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_trend_long_magnitude_max" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_trend_long_magnitude_ci" type="PositiveDecimalSimpleType"/>
                  <xs:element name="population_trend_long_method" type="String100Type"/>
                  <xs:element name="complementary_favourable_population" type="PositiveDecimalSimpleType"/>
                  <xs:element name="complementary_favourable_population_unit" type="String50Type"/>
                  <xs:element name="complementary_favourable_population_op" type="String10Type"/>
                  <xs:element name="complementary_favourable_population_unknown" type="String01Type"/>
                  <xs:element name="complementary_favourable_population_method" type="StringSimpleType"/>
                  <xs:element name="population_reasons_for_change" type="DataChangeType"/>
                  <xs:element name="population_info" type="StringSimpleType" />
                  <!--  7. Habitat for the species -->
                  <xs:element name="habitat_sufficiency_occupied" type="String10Type"/>
                  <xs:element name="habitat_sufficiency_unoccupied" type="String10Type"/>
                  <xs:element name="habitat_sufficiency_method" type="String100Type"/>
                  <xs:element name="habitat_trend_period" type="PeriodType"/>
                  <xs:element name="habitat_trend" type="String15Type"/>
                  <xs:element name="habitat_trend_method" type="String100Type"/>
                  <xs:element name="habitat_trend_long_period" type="PeriodType"/>
                  <xs:element name="habitat_trend_long" type="String15Type"/>
                  <xs:element name="habitat_trend_long_method" type="String100Type"/>
                  <xs:element name="habitat_info" type="StringSimpleType"/>
                  <!--  8. Main pressures and threats -->
                  <xs:element name="pressures">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="pressure" type="PressureThreatType" minOccurs="0" maxOccurs="10"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="threats">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="threat" type="PressureThreatType" minOccurs="0" maxOccurs="10"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="data_pressures_threats_info">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="pressures_source" type="StringSimpleType"/>
                        <xs:element name="pressures_info" type="StringSimpleType"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <!-- 9. Conservation measures -->
                  <xs:element name="conservation_measures">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="measures_needed" type="BooleanSimpleType" />
                        <xs:element name="measures_status" type="String100Type" />
                        <xs:element name="measures_purpose" type="String100Type" />
                        <xs:element name="measures_location" type="String100Type" />
                        <xs:element name="measures_response" type="String100Type" />
                        <xs:element name="measures">
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="measure" maxOccurs="10" minOccurs="0">
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element name="code" type="String10Type"/>
                                  </xs:sequence>
                                </xs:complexType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                        <xs:element name="measures_info" type="StringSimpleType" />
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <!-- 10. Future prospects -->
                  <xs:element name="future_range" type="String10Type"/>
                  <xs:element name="future_population" type="String10Type"/>
                  <xs:element name="future_habitat" type="String10Type"/>
                  <xs:element name="future_info" type="StringSimpleType"/>
                  <!--  11. Conclusions -->
                  <xs:element name="conclusion_range" type="String10Type"/>
                  <xs:element name="conclusion_population" type="String10Type"/>
                  <xs:element name="conclusion_habitat" type="String10Type"/>
                  <xs:element name="conclusion_future" type="String10Type"/>
                  <xs:element name="conclusion_assessment" type="String10Type"/>
                  <xs:element name="conclusion_assessment_trend" type="String10Type"/>
                  <xs:element name="status_reasons_for_change" type="DataChangeType"/>
                  <xs:element name="trend_reasons_for_change" type="DataChangeType"/>
                  <xs:element name="conclusion_info" type="StringSimpleType"/>
                  <!--  12. Natura 2000 (pSCIs, SCIs and SACs) coverage for Annex II species -->
                  <xs:element name="natura2000_population_unit" type="String50Type"/>
                  <xs:element name="natura2000_population_min" type="PositiveDecimalSimpleType"/>
                  <xs:element name="natura2000_population_max" type="PositiveDecimalSimpleType"/>
                  <xs:element name="natura2000_population" type="PositiveDecimalSimpleType"/>
                  <xs:element name="natura2000_population_estimate_type" type="String25Type" />
                  <xs:element name="natura2000_population_method" type="String100Type"/>
                  <xs:element name="natura2000_population_trend" type="String15Type"/>
                  <xs:element name="natura2000_population_trend_method" type="String100Type" />
                  <xs:element name="natura2000_info" type="StringSimpleType" />
                  <!-- 13. Complementary information -->
                  <xs:element name="justification" type="StringSimpleType"/>
                  <xs:element name="transboundary_assessment" type="StringSimpleType"/>
                  <xs:element name="other_relevant_info" type="StringSimpleType"/>
                </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>