<?xml version="1.0" encoding="UTF-8"?>
<!-- XML Schema definition for Litchi_2 Crossmaps Draft 0.1 -->
<!-- J.S.Robinson[at]soton.ac.uk - Species2000 Europa -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <!-- simple type elements -->
  <xs:element name="rank" type="xs:string"/>
  <xs:element name="genus" type="xs:string"/>
  <xs:element name="specific-epithet" type="xs:string"/>
  <xs:element name="authority" type="xs:string"/>
  <xs:element name="infraspecific-name" type="xs:string"/>
  <xs:element name="higher-taxon-name" type="xs:string"/>
  <!-- attributes -->
  <xs:attribute name="id" type="xs:string"/>
  <xs:attribute name="listid" type="xs:string"/>
  <xs:attribute name="taxonid" type="xs:string"/>
  <xs:attribute name="relationship-type">
    <xs:simpleType>
      <xs:restriction base="xs:string">
      	<xs:enumeration value="congruent"/>
        <xs:enumeration value="included-in"/>
	<xs:enumeration value="included-by"/>
	<xs:enumeration value="overlaps"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:attribute>
  <!-- complex type elements -->
  <!-- infraspecific-portion -->
  <xs:element name="infraspecific-portion">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="rank"/>
	<xs:element ref="infraspecific-name"/>
        <xs:element ref="authority"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!-- binomial -->
  <xs:element name="binomial">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="genus"/>
	<xs:element ref="epithet"/>
	<xs:element ref="authority"/>
	<xs:element ref="infraspecific-portion" minOccurrs="0" maxOccurs="1"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!-- name -->
  <xs:element name="name">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="authority"/>
	<xs:choice>
	  <xs:element ref="binomial"/>
	  <xs:element ref="higher-taxon-name"/>
	</xs:choice>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!-- relationship -->
  <xs:element name="relationship">
    <xs:complexType>
      <xs:element ref="taxon"/>
      <xs:attribute ref="relationship-type"/>
    </xs:complexType>
  </xs:element>
  <!-- taxon -->
  <xs:element name="taxon">
    <xs:complexType>
      <xs:element ref="name" minOccurrs="0" maxOccurs="1"/>
      <xs:attribute ref="listid"/>
      <xs:attribure ref="taxonid"/>
    </xs:complexType>
  </xs:element>
  <!-- Item -->
  <xs:element name="item">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="taxon"/>
	<xs:element ref="relationship"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!-- Crossmap -->
  <xs:element name="Crossmap">
    <xs:complexType>
      <xs:element ref="item" minOccurrs="1" maxOccurs="unbounded"/>
      <xs:attribute ref="id"/>
    </xs:complexType>
  </xs:element>
</xs:schema>

