<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:olac="http://www.language-archives.org/OLAC/0.4/"
        targetNamespace="http://www.language-archives.org/OLAC/0.4/"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified">

  <annotation>
    <documentation>

      Schema for the OLAC Archive Description, Version 0.4-1
      Steven Bird, 2001-01-10

      Schema validated at http://www.w3.org/2001/03/webdata/xsv
      XSV 1.203.2.38/1.106.2.21 of 2001/12/07 20:43:15

      OLAC Archive Description semantics available at:
      http://www.language-archives.org/OLAC/protocol-20011210.html

      This is the initial version of the schema.
      2002-05-20: added length restrictions (varchar255)

    </documentation>
  </annotation>

  <element name="olac-archive" type="olac:olac-archive"/>

  <complexType name="olac-archive">
    <complexContent>
      <restriction base="anyType">
        <sequence>
          <element name="archiveURL" minOccurs="0" type="anyURI"/>
          <element name="curator" type="olac:varchar255"/>
          <element name="curatorTitle" minOccurs="0" type="olac:varchar255"/>
          <element name="curatorEmail" minOccurs="0" type="olac:mailto"/>
          <element name="institution" type="olac:varchar255"/>
          <element name="institutionURL" minOccurs="0" type="anyURI"/>
          <element name="location" minOccurs="0" type="olac:block"/>
          <element name="synopsis" type="olac:block"/>
          <element name="access" type="olac:block"/>
<!--
          <element name="rights" type="olac:rights"/>
-->
        </sequence>
        <attribute name="type" use="required" type="olac:OAT"/>
      </restriction>
    </complexContent>
  </complexType>

<!-- OLAC Archive Type -->

  <simpleType name="OAT">
    <restriction base="string">
      <enumeration value="institutional"/>
      <enumeration value="personal"/>
    </restriction>
  </simpleType>

  <complexType name="rights">
    <simpleContent>
      <extension base="olac:block">
        <attribute name="license">
          <simpleType>
            <restriction base="string">
              <enumeration value="OPL"/>
              <enumeration value="other"/>
            </restriction>
          </simpleType>
        </attribute>
      </extension>
    </simpleContent>
  </complexType>

  <simpleType name="mailto">
    <restriction base="anyURI">
      <pattern value="mailto:.*"/>
    </restriction>
  </simpleType>

  <simpleType name="block">
    <restriction base="string">
      <maxLength value="1000"/>
    </restriction>
  </simpleType>

  <simpleType name="varchar255">
    <restriction base="string">
      <maxLength value="255"/>
    </restriction>
  </simpleType>

</schema>


