<?xml version="1.0" encoding="UTF-8" ?> 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/" targetNamespace="http://purl.org/ebank/terms/" xmlns="http://purl.org/ebank/terms/" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:annotation>
  <xs:documentation xml:lang="en">eBank Terms XML Schema Created 2004-03-19 Created by Monica Duke (m.duke@ukoln.ac.uk). Encoding schemes are defined as complexTypes which are restrictions of the dc:SimpleLiteral complexType. These complexTypes restrict values to an appropriate syntax or format using data typing, regular expressions, or enumerated lists. In order to specify one of these encodings an xsi:type attribute must be used in the instance document. Also, note that one shortcoming of this approach is that any type can be applied to any of the elements or refinements. There is no convenient way to restrict types to specific elements using this approach.
*** Changes ***
Modified 2008-04-29 to update location of ebank schema
Modified 2006-03-10 to update location of imported dc schemas.
Modified 2006-02-05 to add keywords as the list of types for dc:subject
and added DOI as a specific type of identifier 
i.e. as an encoding scheme for identifier. 
Modified 2005-08-08 to remove the complex types CCDC and Empirical Formula and to change IUPAC to InChI.
Modified 2005-06-17 to add a ValidationDataset to eBankDataset Types 
and ChemicalFormula to the complex types
Modified 2004-06-11 to change to 20030402 dc schema for use with qualified dc. 
dc Schema location changes to http://www.dublincore.org/schemas/xmls/qdc/2003/04/02/dc.xsd
Corrected case of  compoundclass to CompoundClass, empiricalFormula to EmpiricalFormula,
and ebankDatasetType to EbankDatasetType
organic to Organic, inorganic to Inorganic, organometallic to Organometallic and bio-organic to Bio-organic.
initialisationDatase to InitialisationDataset, refinementDataset to RefinementDataset, 
collectionDataset to CollectionDataset, processingDataset to ProcessingDatset
solutionDataset to SolutionDataset, refinementDataset to RefinementDataset 
  </xs:documentation>
</xs:annotation>
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd" /> 
  <xs:import namespace="http://purl.org/dc/terms/" schemaLocation="http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd" /> 
  <xs:import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="http://www.dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd" /> 

 <xs:group name="elementsAndRefinementsGroup">
  	<xs:annotation>
    	<xs:documentation xml:lang="en">
            This group is included as a convenience for schema authors
            who need to refer to all the DC elements and element refinements 
            in the http://purl.org/dc/elements/1.1/ and 
            http://purl.org/dc/terms namespaces.
            N.B. Refinements available via substitution groups.
    	</xs:documentation>
  	</xs:annotation>

  <xs:sequence>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
	<xs:element ref="dc:any" />
    </xs:choice>
  </xs:sequence>
  </xs:group>	

<!-- reuse the elementOrRefinement Container from dcterms
   to define an outer container -->
  <xs:complexType name="elementOrRefinementContainer">
  	<xs:annotation>
    	<xs:documentation xml:lang="en">
    		This is included as a convenience for schema authors who need to define a root
    		or container element for all of the DC elements and element refinements.
    	</xs:documentation>
  	</xs:annotation>

    <xs:choice>
      <xs:group ref="elementsAndRefinementsGroup"/>
    </xs:choice>
  </xs:complexType>


  <!-- these types are intended to be used as values for
  the xsi:type attribute in dc:subject. They should be
  replaced by official types from the bodies concerned
  e.g. IUPAC, CCDC if official types become available. -->

  <xs:complexType name="InChI">
    <xs:simpleContent>
      <xs:restriction base="dc:SimpleLiteral">
        <xs:simpleType>
          <xs:restriction base="xs:string" /> 
        </xs:simpleType>
        <xs:attribute ref="xml:lang" use="prohibited" /> 
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>


  <xs:complexType name="ChemicalFormula">
    <xs:simpleContent>
      <xs:restriction base="dc:SimpleLiteral">
        <xs:simpleType>
          <xs:restriction base="xs:string" /> 
        </xs:simpleType>
        <xs:attribute ref="xml:lang" use="prohibited" /> 
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="Keywords">
    <xs:simpleContent>
      <xs:restriction base="dc:SimpleLiteral">
        <xs:simpleType>
          <xs:restriction base="xs:string" /> 
        </xs:simpleType>
        <xs:attribute ref="xml:lang" use="prohibited" /> 
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="CompoundClass">
    <xs:simpleContent>
      <xs:restriction base="dc:SimpleLiteral">
        <xs:simpleType>
          <xs:restriction base="xs:Name"> 
            <xs:enumeration value="Organic" />
            <xs:enumeration value="Bio-organic" />
            <xs:enumeration value="Organometallic" />
            <xs:enumeration value="Inorganic" />
          </xs:restriction>
        </xs:simpleType>
        <xs:attribute ref="xml:lang" use="prohibited" /> 
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <!-- DOI is intended to be used as a value for
   the xsi:type attribute in dc:identifier  -->

  <xs:complexType name="DOI">
    <xs:simpleContent>
      <xs:restriction base="dc:SimpleLiteral">
        <xs:simpleType>
          <xs:restriction base="xs:string" /> 
        </xs:simpleType>
        <xs:attribute ref="xml:lang" use="prohibited" /> 
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>


  <!-- ebankDatasetType is intended to be used as a value for
   the xsi:type attribute in dc:type and limits the values
   that the dc:type element may take.  -->

  <xs:complexType name="EbankDatasetType">
    <xs:simpleContent>
      <xs:restriction base="dc:SimpleLiteral">
        <xs:simpleType>
          <xs:restriction base="xs:Name">
            <xs:enumeration value="InitialisationDataset" />
            <xs:enumeration value="CollectionDataset" />
            <xs:enumeration value="ProcessingDataset" />
            <xs:enumeration value="SolutionDataset" />
            <xs:enumeration value="RefinementDataset" />
            <xs:enumeration value="CIFDataset" />
            <xs:enumeration value="ValidationDataset" />
          </xs:restriction>
        </xs:simpleType>
        <xs:attribute ref="xml:lang" use="prohibited" />
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

</xs:schema>
