<?xml version="1.0" encoding="UTF-8"?>

<!-- 
  Variations/FRBR Project schema release 1.0
-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

            xmlns:efrbr-work="http://vfrbr.info/efrbr/1.0/work"
            xmlns:efrbr-expression="http://vfrbr.info/efrbr/1.0/expression"
            xmlns:efrbr-manifestation="http://vfrbr.info/efrbr/1.0/manifestation"
            xmlns:efrbr-item="http://vfrbr.info/efrbr/1.0/item"
            xmlns:efrbr-person="http://vfrbr.info/efrbr/1.0/person"
            xmlns:efrbr-family="http://vfrbr.info/efrad/1.0/family"
            xmlns:efrbr-corporateBody="http://vfrbr.info/efrbr/1.0/corporateBody"
            xmlns:efrbr-concept="http://vfrbr.info/efrbr/1.0/concept"
            xmlns:efrbr-event="http://vfrbr.info/efrbr/1.0/event"
            xmlns:efrbr-object="http://vfrbr.info/efrbr/1.0/object"
            xmlns:efrbr-place="http://vfrbr.info/efrbr/1.0/place"

            xmlns="http://vfrbr.info/efrbr/1.0"
            targetNamespace="http://vfrbr.info/efrbr/1.0"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified"
            >

  <!--
    import the eFRBR entity
    (separately namespaced) schemas
    -->
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/work"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-work.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/expression"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-expression.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/manifestation"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-manifestation.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/item"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-item.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/person"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-person.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrad/1.0/family"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-family.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/corporateBody"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-corporateBody.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/concept"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-concept.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/event"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-event.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/object"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-object.xsd"
              />
  <xsd:import namespace="http://vfrbr.info/efrbr/1.0/place"
              schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-place.xsd"/>

  <!--
    include the eFRBR relation
    (efrbr namespaced) schemas
    -->
  <xsd:include schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-structure.xsd"
               />
  <xsd:include schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-responsible.xsd"
               />
  <xsd:include schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-subject.xsd"
               />
  <xsd:include schemaLocation="http://vfrbr.info/schemas/1.0/efrbr-other.xsd"/>

  <!--
    XML element defintion
    for the document root
    -->
  <xsd:element name="recordSet">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="entities"
                     minOccurs="0" maxOccurs="1"
                     />
        <xsd:element ref="relationships"
                     minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <!--
    XML element definition
    for the entities collection
    -->
  <xsd:element name="entities">
    <xsd:complexType>
      <xsd:sequence>
        <!-- group1 -->
        <xsd:element ref="efrbr-work:work"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="efrbr-expression:expression"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="efrbr-manifestation:manifestation"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="efrbr-item:item"
                     minOccurs="0" maxOccurs="unbounded"/>
        <!-- group2 -->
        <xsd:element ref="efrbr-person:person"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="efrbr-family:family"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="efrbr-corporateBody:corporateBody"
                     minOccurs="0" maxOccurs="unbounded"/>
        <!-- group3 -->
        <xsd:element ref="efrbr-concept:concept"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="efrbr-object:object"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="efrbr-event:event"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="efrbr-place:place"
                     minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <!--
    XML element defintion
    for the relationships collection
    -->
  <xsd:element name="relationships">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="structureRelations"
                     minOccurs="0" maxOccurs="1"
                     />
        <xsd:element ref="responsibleRelations"
                     minOccurs="0" maxOccurs="1"
                     />
        <xsd:element ref="subjectRelations"
                     minOccurs="0" maxOccurs="1"
                     />
        <xsd:element ref="otherRelations"
                     minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

</xsd:schema>



