<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:annotation>
    <xs:documentation>

      Copyright (C) 2002-2021  The FreeCol Team

      This file is part of FreeCol.

      FreeCol is free software: you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation, either version 2 of the License, or
      (at your option) any later version.

      FreeCol is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with FreeCol. If not, see http://www.gnu.org/licenses
    </xs:documentation>
  </xs:annotation>

  <xs:simpleType name="AbilityId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.ability\.([a-zA-Z]+)" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="BuildingTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.building\.([a-zA-Z]+)" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DifficultyLevelId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.difficulty\.([a-zA-Z]+)" />
    </xs:restriction>
  </xs:simpleType>

  <!-- @compat 0.11.x Gone in 0.12.x -->
  <xs:simpleType name="EquipmentTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.equipment(\.indian)?\.([a-zA-Z]+)" />
    </xs:restriction>
  </xs:simpleType>
  <!-- end @compat 0.11.x -->

  <xs:simpleType name="FoundingFatherId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.foundingFather\.([a-zA-Z]+)" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GoodsTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.goods\.([a-zA-Z])+" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NationId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.nation\.([a-zA-Z])+" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NationTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.nationType\.([a-zA-Z])+" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OptionId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.option(\.[a-zA-Z0-9]+)+" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ResourceTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.resource\.([a-zA-Z])+" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RoleId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.role\.([a-zA-Z]+)" />
    </xs:restriction>
  </xs:simpleType>

  <!-- @compat 0.11.0 -->
  <xs:simpleType name="RoleIdCompat">
    <xs:restriction base="xs:string">
      <xs:pattern value="(DEFAULT|DRAGOON|SOLDIER|model\.role\.([a-zA-Z]+))" />
    </xs:restriction>
  </xs:simpleType>
  <!-- end @compat 0.11.0 -->

  <xs:simpleType name="SettlementTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.settlement(\.[a-zA-Z]+)+" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TileImprovementTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.improvement\.([a-zA-Z])+" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TileTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.tile\.([a-zA-Z])+" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="UnitChangeTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.unitChange\.([a-zA-Z]+)" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="UnitTypeChangeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.unitChange\.([a-zA-Z]+)\.([-a-zA-Z]+)" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="UnitTypeId">
    <xs:restriction base="xs:string">
      <xs:pattern value="model\.unit\.([a-zA-Z])+" />
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
