<?xml version='1.0' encoding='UTF-8'?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:datacite="http://datacite.org/schema/kernel-4" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://namespace.openaire.eu/schema/oaire/" elementFormDefault="qualified" targetNamespace="http://namespace.openaire.eu/schema/oaire/" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema https://www.w3.org/2012/04/XMLSchema.xsd">

  <xs:import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="65a8e95a11fb0ea09915084998235373cefa157ef59197ed0147c8ec134f19ac.xsd"/>

  <xs:import namespace="http://purl.org/dc/terms/" schemaLocation="f6521cc96d66d43ff98a3f5ba6b6a098b98fb1f3acf28f9e70774cd19422ef1e.xsd"/>

  <xs:import namespace="http://datacite.org/schema/kernel-4" schemaLocation="df8dac7447c2bb93b447c82e476470289f4ddd5d0bbb447e9e498ffd6ecc7ba9.xsd"/>
  
  <xs:include schemaLocation="a390c6d3d0c963e460b25a2c6564ec53432838c47a1d8098fc6c0018a1d227da.xsd"/> 

 <xs:element name="resource">
  <xs:annotation>
    <xs:documentation>
      This schema defines the xml format for OpenAIRE Guidelines for Literature Repositories v4.
      
      The schema represents an application profile consisting of
      * elements from Dublin Core with optional refinement attributes xml:lang and rdf:resource
      * elements from DataCite metadata schema v4.1 to express granular information on creator, contributor, fundingReference, relatedIdentifier, alternateIdentifier, date, subject
      * elements from OpenAIRE to express information on bibliographic citation details, (fulltext) files,  version and license condition
    </xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:choice maxOccurs="unbounded">
      <xs:element ref="dc:coverage" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Optional</xs:documentation>
          <xs:documentation xml:lang="en">The extent or scope of the content of the resource. Coverage will typically include spatial location (a place name or geographic coordinates), temporal period (a period label, date, or date range) or jurisdiction (such as a named administrative entity).</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="datacite:creators">
        <xs:annotation>
          <xs:documentation>Mandatory if applicable</xs:documentation>
          <xs:documentation>An entity primarily responsible for making the resource. (DCMI definition)</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element ref="datacite:contributors" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Mandatory if applicable</xs:documentation>
          <xs:documentation>An entity responsible for making contributions to the content of the resource. Examples of a Contributor include a person, an organization, or a service. Typically, the name of a Contributor should be used to indicate the entity. (DCMI definition)</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element ref="fundingReferences" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Mandatory if applicable</xs:documentation>
          <xs:documentation>Information about financial support (funding) for the resource being registered. (DataCite definition)</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="datacite:alternateIdentifiers" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional</xs:documentation>
          <xs:documentation>An identifier or identifiers other than the primary Identifier applied to the resource being registered. This may be any alphanumeric string which is unique within its domain of issue. May be used for local identifiers. AlternateIdentifier should be used for another identifier of the same instance (same location, same file).</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="datacite:relatedIdentifiers" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional</xs:documentation>
          <xs:documentation>Identifiers of related resources. Use this property to indicate subsets of properties, as appropriate. (DataCite definition)</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element ref="datacite:dates" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Optional, use 'accepted' to indicate embargo start date</xs:documentation>
          <xs:documentation xml:lang="en">Optional, use 'available' to indicate embargo end date</xs:documentation>
          <xs:documentation xml:lang="en">(TODO compare with dc:date) Optional, use 'issued' to indicate date of publication</xs:documentation>
        </xs:annotation>        
      </xs:element>

      <xs:element ref="datacite:titles" minOccurs="1">
        <xs:annotation>
          <xs:documentation>Mandatory</xs:documentation>
          <xs:documentation>A name given to the resource.</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element ref="dc:language" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Mandatory</xs:documentation>
          <xs:documentation>A language of the intellectual content of the resource. (DCMI definition)</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="dc:publisher" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Mandatory when applicable</xs:documentation>
          <xs:documentation>An entity responsible for making the resource available. Examples of a Publisher include a person, an organization, or a service. Typically, the name of a Publisher should be used to indicate the entity. (DCMI definition)</xs:documentation>
        </xs:annotation>
      </xs:element>

      
      <xs:element ref="resourceType" minOccurs="1">
        <xs:annotation>
          <xs:documentation>Mandatory</xs:documentation>
          <xs:documentation>The type of scientific output the resource is a manifestation of. </xs:documentation>
        </xs:annotation>
      </xs:element>
            
      <xs:element ref="dc:description" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mandatory when applicable</xs:documentation>
          <xs:documentation>An account of the resource. (DCMI definition)</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="dc:format" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
          <xs:documentation>The file format, physical medium, or dimensions of the resource. (DCMI definition)</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="datacite:identifier" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mandatory</xs:documentation>
          <xs:documentation>An unambiguous reference to the resource within a given context.</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="datacite:rights" minOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mandatory</xs:documentation>
          <xs:documentation>The main access right of the resource</xs:documentation>
          <xs:documentation>The accessright attribute in the file element might be more specific</xs:documentation>
          <xs:documentation>The rdf:resource attribute should contain the concept-URI chosen from the COAR Access Right vocabulary.</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="dc:source" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
          <xs:documentation>A reference to a resource from which the present resource is derived. (DCMI definition)</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="datacite:subjects" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mandatory when applicable</xs:documentation>
          <xs:documentation>(TODO) a recommended list of subjec classification scheme URIs to provide in rdf:resource attribute</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element ref="datacite:geoLocations" minOccurs="0" maxOccurs="unbounded">
  <xs:annotation>
    <xs:documentation>Spatial region or named place where the data was gathered or about which the data is focused </xs:documentation>
  </xs:annotation>
</xs:element>
  <xs:element ref="datacite:sizes" minOccurs="0" maxOccurs="unbounded">
    <xs:annotation>
      <xs:documentation>Unstructured size information about the resource (occurrences: 0-n).</xs:documentation>
    </xs:annotation>
  </xs:element>
      <xs:element ref="citationTitle" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>          
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="citationVolume" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="citationIssue" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="citationStartPage" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="citationEndPage" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element ref="citationEdition" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element ref="citationConferencePlace" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element ref="citationConferenceDate" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="version" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
          <xs:documentation>(TODO) use term from controlled list of version types; alignment with and URIfication of NISO-JAV terms pending.</xs:documentation>
        </xs:annotation>
      </xs:element>
      
      <xs:element ref="file" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Mandatory if applicable</xs:documentation>
          <xs:documentation>The link(s) to the fulltext file(s)</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:element ref="licenseCondition" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en">Recommended</xs:documentation>
          <xs:documentation>License condition</xs:documentation>
        </xs:annotation>
      </xs:element>

    <xs:element ref="dcterms:audience" minOccurs="0" maxOccurs="unbounded">
      <xs:annotation>
        <xs:documentation>A class of entity for whom the resource is intended or useful.</xs:documentation>
      </xs:annotation>
    </xs:element>
    </xs:choice>    
  </xs:complexType>
  
</xs:element>


</xs:schema>