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

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

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

            xmlns="http://vfrbr.info/vfrbr/1.1/responsible"
            targetNamespace="http://vfrbr.info/vfrbr/1.1/responsible"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified"
            >

  <!--
    XML element definitions
    for the FRBR Responsible relationshipTypes
    -->

  <xsd:element name="createdBy"
               type="CreatedByType"
               />
  <xsd:element name="realizedBy"
               type="RealizedByType"
               />
  <xsd:element name="producedBy"
               type="ProducedByType"
               />
  <xsd:element name="ownedBy"
               type="OwnedByType"/>

  <!--
    type for createdBy
    -->
  <xsd:complexType name="CreatedByType">

    <xsd:attribute name="sourceEntity"
                   use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="work"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="sourceURI"
                   type="xsd:anyURI"
                   use="required"/>

    <xsd:attribute name="targetEntity"
                   use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="person"/>
          <xsd:enumeration value="corporateBody"/>
          <xsd:enumeration value="family"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="targetURI"
                   type="xsd:anyURI"
                   use="required"/>

    <xsd:attribute name="role"
                   type="xsd:string"
                   use="optional"/>

  </xsd:complexType>

  <!--
    type for realizedBy
    -->
  <xsd:complexType name="RealizedByType">

    <xsd:attribute name="sourceEntity"
                   use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="expression"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="sourceURI"
                   type="xsd:anyURI"
                   use="required"/>

    <xsd:attribute name="targetEntity"
                   use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="person"/>
          <xsd:enumeration value="corporateBody"/>
          <xsd:enumeration value="family"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="targetURI"
                   type="xsd:anyURI"
                   use="required"/>

    <xsd:attribute name="role"
                   type="xsd:string"
                   use="optional"/>

  </xsd:complexType>

  <!--
    type for producedBy
    -->
  <xsd:complexType name="ProducedByType">

    <xsd:attribute name="sourceEntity"
                   use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="manifestation"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="sourceURI"
                   type="xsd:anyURI"
                   use="required"/>

    <xsd:attribute name="targetEntity"
                   use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="person"/>
          <xsd:enumeration value="corporateBody"/>
          <xsd:enumeration value="family"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="targetURI"
                   type="xsd:anyURI"
                   use="required"/>

    <xsd:attribute name="role"
                   type="xsd:string"
                   use="optional"/>

  </xsd:complexType>

  <!--
    type for ownedBy
    -->
  <xsd:complexType name="OwnedByType">

    <xsd:attribute name="sourceEntity"
                   use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="item"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="sourceURI"
                   type="xsd:anyURI"
                   use="required"/>

    <xsd:attribute name="targetEntity"
                   use="required">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="person"/>
          <xsd:enumeration value="corporateBody"/>
          <xsd:enumeration value="family"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>

    <xsd:attribute name="targetURI"
                   type="xsd:anyURI"
                   use="required"/>

    <xsd:attribute name="role"
                   type="xsd:string"
                   use="optional"/>

  </xsd:complexType>


</xsd:schema>
