<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified"
  xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns="http://namespace.openaire.eu/oaf"
  targetNamespace="http://namespace.openaire.eu/oaf">

  <xs:annotation>
    <xs:documentation>This schema describes the OpenAIRE+ entities.</xs:documentation>
  </xs:annotation>

  <xs:include schemaLocation="oaf-result-0.2.xsd"/>
  <xs:include schemaLocation="oaf-person-0.2.xsd"/>
  <xs:include schemaLocation="oaf-org-0.2.xsd"/>
  <xs:include schemaLocation="oaf-datasource-0.2.xsd"/>
  <xs:include schemaLocation="oaf-project-0.2.xsd"/>

  <xs:element name="entity">
    <xs:complexType>
      <xs:sequence>
        <xs:choice>
          <xs:element ref="result">
            <xs:annotation>
              <xs:documentation>Entity of type result are publications and
                datasets</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element ref="person"/>
          <xs:element ref="organization"/>
          <xs:element ref="datasource"/>
          <xs:element ref="project"/>
        </xs:choice>
        <xs:element name="extraInfo" type="extraInfoType" maxOccurs="unbounded" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Content-agnostic container for extra information about the current
              entity. Examples are information about statistics and citations. The values inside
              this field can be any well-formed XML. </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
