<?xml version="1.0" encoding="UTF-8"?>
<!-- 2011-09-08
   TaxonX version 1.2.2
   Editors:
   Terry Catapano
   Donat Agosti
   
-->
<!--
      
   Derived from the taxonx version 1 schema prepared as part of NSF Funded Project:
   
   Collaborative Research: Development of New Digital Library Applications
   in the Context of a Basic Ontology for Biosystematics Information Using the 
   Literature of Entomology (Ants)
   NSF #241229, 4/1/2004 - 2/28/2007
   Christie Stephenson (PI)
   
-->
<!-- REVISION HISTORY -->
<!-- 2005-08-01
   TaxonX version 1.0
   Drew Koning & TC
-->
<!-- TC 
   2006-01-02:
   add rank attribute to treatment
   remove rank attribute from div
   add figure to div and treatment
   add optional head as first child of div
   2006-01-12
   treatment now recursive
-->
<!-- TC
   2006-01-17
   added xid (external identifier) to name to include identifiers for taxa in external systems such as ITIS or HNS
   added name to p
-->
<!-- TC
   2006-02-13
   added head, figure, note, and pb to content model of ref_group
-->
<!-- TC
   2006-06-06
   added statement
-->
<!-- TC
   2006-06-08
   added name attribute to character
-->
<!-- TC 
   2007-01-07
   added pb to cite; xid to cite, character, state.
-->
<!-- TC
   2007-01-11
   added figure and pb to content model of figures
   created standardAttrs (id and n) group included in all content models.
   Added to pb and figure to most elements
-->
<!-- TC
   2007-01-21
   added head to treatment
-->
<!-- TC
   2007-01-24
   changed namespace of schema to http://www.taxonx.org/schema/v1
   added othertype attribute to div; added othertype as value of type attribute of div.
   created element bibref to replace citation in ref_group
-->
<!-- TC
   2007-01-28
   added elements to content model of citation
   made type and type_loc global elements (temporarily)
-->
<!-- TC
   2007-01-31
   added bibref to nomenclature
-->
<!-- TC
   2007-04-24
   added treatment to note
-->
<!-- TC
   2007-10-30
   added name to content model of bibref and title
   gave title complex element definition
   added p to content model of ref_group
-->
<!-- TC
   2007-11-07
   p can now be child of taxonxBody. To faciliate very lightweight/automated markup
-->
<!-- TC
   2008-05-27
   name can now be child of collection_event
-->
<!-- TC
   2008-07-08
   deglobalized all elements except taxonx and treatment
   added taxonxHeader to treatment
-->
<!-- TC
   version 1.2.1
   2011-07-28
   changed treatment from element to complexType
-->
<!-- TC
   version 1.2.2
   2011-09-08
   removed complexType author and made element author type name
   changed treatment back to element so now global again; treatment elements now use ref rather than name
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.taxonx.org/schema/v1" xmlns:dc="http://digir.net/schema/conceptual/darwin/core/1.0" xmlns:mods="http://www.loc.gov/mods/v3" targetNamespace="http://www.taxonx.org/schema/v1" elementFormDefault="qualified">
   <xs:import namespace="http://www.loc.gov/mods/v3" schemaLocation="http://www.loc.gov/standards/mods/v3/mods-3-1.xsd"/>
   <xs:import namespace="http://digir.net/schema/conceptual/darwin/2003/1.0" schemaLocation="http://digir.net/schema/conceptual/darwin/manis/1.21/darwin2.xsd"/>
   <xs:element name="taxonx">
      <xs:complexType>
         
      <xs:sequence>
         <xs:element name="taxonxHeader" type="taxonxHeader"/>
         <xs:element name="taxonxBody" type="taxonxBody"/>
      </xs:sequence>
      </xs:complexType>
   </xs:element>
   <xs:complexType name="taxonxHeader">
      <xs:choice>
         <xs:any namespace="http://www.loc.gov/mods/v3"/>
      </xs:choice>
   </xs:complexType>
   <xs:complexType name="taxonxBody">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="div" type="div"/>
         <xs:element name="p" type="p"/>
         <xs:element name="head" type="head"/>
         <xs:element ref="treatment"/>
         <xs:element name="note" type="note"/>
         <xs:element name="ref_group" type="ref_group"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="citation" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="xid" type="xid"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="nomenclature" type="nomenclature"/>
         <xs:element name="collection_event" type="collection_event"/>
         <xs:element name="locality" type="locality"/>
         <xs:element name="note" type="note"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="type" type="xs:string" use="optional"/>
   </xs:complexType>
   <xs:complexType name="div">
      <xs:sequence maxOccurs="1">
         <xs:element name="head" type="head" maxOccurs="1" minOccurs="0"/>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="p" type="p"/>
            <xs:element name="div" type="div"/>
            <xs:element name="pb" type="pb"/>
            <xs:element name="figure" type="figure"/>
         </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="type" use="optional">
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="abstract"/>
               <xs:enumeration value="acknowledgments"/>
               <xs:enumeration value="biology_ecology"/>
               <xs:enumeration value="description"/>
               <xs:enumeration value="diagnosis"/>
               <xs:enumeration value="discussion"/>
               <xs:enumeration value="distribution"/>
               <xs:enumeration value="etymology"/>
               <xs:enumeration value="key"/>
               <xs:enumeration value="introduction"/>
               <xs:enumeration value="materials_examined"/>
               <xs:enumeration value="materials_methods"/>
               <xs:enumeration value="multiple"/>
               <xs:enumeration value="synopsis"/>
               <xs:enumeration value=""/>
            </xs:restriction>
         </xs:simpleType>
      </xs:attribute>
   </xs:complexType>
   <xs:complexType name="head" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="author" type="name"/>
         <xs:element name="note" type="note"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
         <xs:element name="title" type="title"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="type" type="xs:string" use="optional"/>
   </xs:complexType>
   <xs:complexType name="name" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="xid" type="xid"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="note" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="treatment"/>
         <xs:element name="note" type="note"/>
         <xs:element name="figure" type="figure"/>
         <xs:element name="p" type="p"/>
         <xs:element name="pb" type="pb"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="place" type="xs:string"/>
      <xs:attribute name="resp" type="xs:string"/>
      <xs:attribute name="type" type="xs:string"/>
   </xs:complexType>
   <xs:complexType name="p" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="collection_event" type="collection_event"/>
         <xs:element name="locality" type="locality"/>
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="character" type="character"/>
         <xs:element name="name" type="name"/>
         <xs:element name="figure" type="figure"/>
         <xs:element name="note" type="note"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="seg" type="seg"/>
         <xs:element name="nomenclature" type="nomenclature"/>
         <xs:element name="bibref" type="bibref"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="ref_group">
      <xs:sequence maxOccurs="1">
         <xs:element name="head" type="head" maxOccurs="1" minOccurs="0"/>
         <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="bibref" type="bibref"/>
            <xs:element name="ref_group" type="ref_group"/>
            <xs:element name="figure" type="figure"/>
            <xs:element name="note" type="note"/>
            <xs:element name="pb" type="pb"/>
            <xs:element name="p" type="p"/>
         </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="nomenclature" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="author" type="name"/>
         <xs:element name="citation" type="citation"/>
         <xs:element name="figures" type="figures"/>
         <xs:element name="name" type="name"/>
         <xs:element name="bibref" type="bibref"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="status" type="xs:string"/>
         <xs:element name="synonomy">
            <xs:complexType>
               <xs:sequence maxOccurs="unbounded">
                  <xs:element name="name" type="name"/>
                  <xs:element name="author" type="name" minOccurs="0" maxOccurs="unbounded"/>
                  <xs:element name="year" type="year" minOccurs="0" maxOccurs="unbounded"/>
                  <xs:element name="citation" type="citation" minOccurs="0" maxOccurs="unbounded"/>
                  <xs:element name="note" type="note" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
            </xs:complexType>
         </xs:element>
         <xs:element name="type" type="type"/>
         <xs:element name="type_loc" type="type_loc"/>
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="year" type="year"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="type" mixed="true">
      <xs:sequence>
         <xs:element name="name" type="name"/>
         <xs:element name="author" type="name"/>
      </xs:sequence>
   </xs:complexType>
   <xs:complexType name="type_loc"/>
   <xs:complexType name="year" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="seg" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="character" type="character"/>
         <xs:element name="collection_event" type="collection_event"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attribute name="type" use="optional">
         <xs:simpleType>
            <xs:restriction base="xs:string">
               <xs:enumeration value="biology_ecology"/>
               <xs:enumeration value="collection_data"/>
               <xs:enumeration value="description"/>
               <xs:enumeration value="diagnosis"/>
               <xs:enumeration value="discussion"/>
               <xs:enumeration value="distribution"/>
               <xs:enumeration value="etymology"/>
               <xs:enumeration value="key"/>
               <xs:enumeration value="materials_examined"/>
               <xs:enumeration value="synopsis"/>
               <xs:enumeration value=""/>
            </xs:restriction>
         </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="sub_type" type="xs:string" use="optional"/>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="xmldata">
      <xs:choice maxOccurs="unbounded">
         <xs:any namespace="http://digir.net/schema/conceptual/darwin/2003/1.0"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>

      <xs:element name="treatment">
         <xs:complexType>
            <xs:sequence maxOccurs="1">
               <xs:element name="taxonxHeader" type="taxonxHeader" maxOccurs="1" minOccurs="0"/>
               <xs:element name="head" type="head" maxOccurs="1" minOccurs="0"/>
               <xs:choice maxOccurs="unbounded">
                  <xs:element name="nomenclature" type="nomenclature"/>
                  <xs:element name="div" type="div"/>
                  <xs:element name="ref_group" type="ref_group"/>
                  <xs:element name="pb" type="pb"/>
                  <xs:element name="figure" type="figure"/>
                  <xs:element ref="treatment"/>
               </xs:choice>
            </xs:sequence>
            <xs:attributeGroup ref="standardAttrs"/>
            <xs:attribute name="rank" use="optional">
               <xs:simpleType>
                  <xs:restriction base="xs:string">
                     <xs:enumeration value="order"/>
                     <xs:enumeration value="family"/>
                     <xs:enumeration value="species"/>
                     <xs:enumeration value="genus"/>
                     <xs:enumeration value="subspecies"/>
                     <xs:enumeration value="superfamily"/>
                     <xs:enumeration value="suborder"/>
                     <xs:enumeration value="subfamily"/>
                     <xs:enumeration value="infrasubspecific"/>
                     <xs:enumeration value="other"/>
                  </xs:restriction>
               </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="other_rank" use="optional" type="xs:string">
            </xs:attribute>
         </xs:complexType>
      </xs:element>
   <xs:complexType name="character" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="xid" type="xid"/>
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="character" type="character"/>
         <xs:element name="state" type="state"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="name">
         <xs:simpleType>
            <xs:restriction base="xs:string"/>
         </xs:simpleType>
      </xs:attribute>
   </xs:complexType>
   <xs:complexType name="collection_event" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="locality" type="locality"/>
         <xs:element name="type" type="type"/>
         <xs:element name="type_loc" type="type_loc"/>
         <xs:element name="xid" type="xid"/>
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
         <xs:element name="name" type="name"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="state" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="xid" type="xid"/>
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="locality" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="xid" type="xid"/>
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="xid" mixed="true">
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="identifier"/>
      <xs:attribute name="source"/>
      <xs:attribute name="type"/>
      <xs:attribute name="uri" type="xs:anyURI"/>
   </xs:complexType>
   <xs:complexType name="statement" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="character" type="character"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="figures" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="figure" type="figure"/>
         <xs:element name="pb" type="pb"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
   </xs:complexType>
   <xs:complexType name="pb">
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="url" type="xs:anyURI" use="optional"/>
   </xs:complexType>
   <xs:complexType name="figure">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="figDesc">
            <xs:complexType mixed="true">
               <xs:choice minOccurs="0" maxOccurs="unbounded">
                  <xs:element name="note" type="note"/>
                  <xs:element name="figure" type="figure"/>
                  <xs:element name="pb" type="pb"/>
               </xs:choice>
               <xs:attribute name="id" type="xs:ID"/>
            </xs:complexType>
         </xs:element>
         <xs:element name="head" type="head"/>
         <xs:element name="p" type="p"/>
         <xs:element name="pb" type="pb"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="url" type="xs:anyURI" use="optional"/>
   </xs:complexType>
   <xs:complexType name="bibref" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="xid" type="xid"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
         <xs:element name="name" type="name"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="type" type="xs:string" use="optional"/>
   </xs:complexType>
   <xs:complexType name="title" mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element name="xmldata" type="xmldata"/>
         <xs:element name="xid" type="xid"/>
         <xs:element name="pb" type="pb"/>
         <xs:element name="figure" type="figure"/>
         <xs:element name="name" type="name"/>
      </xs:choice>
      <xs:attributeGroup ref="standardAttrs"/>
      <xs:attribute name="type" type="xs:string" use="optional"/>
   </xs:complexType>
   <xs:attributeGroup name="standardAttrs">
      <xs:attribute name="id" type="xs:ID"/>
      <xs:attribute name="n" type="xs:string"/>
   </xs:attributeGroup>
</xs:schema>
