<?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:frbr-work="http://vfrbr.info/frbr/1.0/work"
            xmlns:frbr-expression="http://vfrbr.info/frbr/1.0/expression"
            xmlns:frbr-manifestation="http://vfrbr.info/frbr/1.0/manifestation"
            xmlns:frbr-item="http://vfrbr.info/frbr/1.0/item"
            xmlns:frbr-person="http://vfrbr.info/frbr/1.0/person"
            xmlns:frbr-family="http://vfrbr.info/frad/1.0/family"
            xmlns:frbr-corporateBody="http://vfrbr.info/frbr/1.0/corporateBody"
            xmlns:frbr-concept="http://vfrbr.info/frbr/1.0/concept"
            xmlns:frbr-event="http://vfrbr.info/frbr/1.0/event"
            xmlns:frbr-object="http://vfrbr.info/frbr/1.0/object"
            xmlns:frbr-place="http://vfrbr.info/frbr/1.0/place"

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

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

  <!--
    include the FRBR relation
    (frbr namespaced) schemas
    -->
  <xsd:include schemaLocation="http://vfrbr.info/schemas/1.0/frbr-structure.xsd"
               />
  <xsd:include schemaLocation="http://vfrbr.info/schemas/1.0/frbr-responsible.xsd"
               />
  <xsd:include schemaLocation="http://vfrbr.info/schemas/1.0/frbr-subject.xsd"
               />
  <xsd:include schemaLocation="http://vfrbr.info/schemas/1.0/frbr-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="frbr-work:work"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="frbr-expression:expression"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="frbr-manifestation:manifestation"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="frbr-item:item"
                     minOccurs="0" maxOccurs="unbounded"/>
        <!-- group2 -->
        <xsd:element ref="frbr-person:person"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="frbr-family:family"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="frbr-corporateBody:corporateBody"
                     minOccurs="0" maxOccurs="unbounded"/>
        <!-- group3 -->
        <xsd:element ref="frbr-concept:concept"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="frbr-object:object"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="frbr-event:event"
                     minOccurs="0" maxOccurs="unbounded"
                     />
        <xsd:element ref="frbr-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>





