<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <!-- $Id: simple2zoom.rnc,v 1.10 2007/09/14 14:35:40 mike Exp $ -->
  <!-- Simple2ZOOM configuration XML is not in any namespace. -->
  <xs:element name="client">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="authentication"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="database"/>
        <xs:element minOccurs="0" ref="search"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="authentication" type="xs:string"/>
  <xs:element name="database">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="zurl"/>
        <xs:element minOccurs="0" ref="resultsetid"/>
        <xs:element minOccurs="0" ref="nonamedresultsets"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="option"/>
        <xs:element minOccurs="0" ref="charset"/>
        <xs:element minOccurs="0" ref="search"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="schema"/>
        <xs:element minOccurs="0" ref="sutrs-record"/>
        <xs:element minOccurs="0" ref="usmarc-record"/>
        <xs:element minOccurs="0" ref="grs1-record"/>
      </xs:sequence>
      <xs:attribute name="name" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="zurl" type="xs:string"/>
  <xs:element name="resultsetid">
    <xs:simpleType>
      <xs:restriction base="xs:token">
        <xs:enumeration value="id"/>
        <xs:enumeration value="search"/>
        <xs:enumeration value="fallback"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="nonamedresultsets">
    <xs:complexType/>
  </xs:element>
  <xs:element name="charset" type="xs:string"/>
  <xs:element name="sutrs-record">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="field"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="usmarc-record">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="field"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="grs1-record">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="field"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="option">
    <xs:complexType mixed="true">
      <xs:attribute name="name" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="search">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="querytype"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="map"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="querytype">
    <xs:simpleType>
      <xs:restriction base="xs:token">
        <xs:enumeration value="cql"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="map">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="index"/>
      </xs:sequence>
      <xs:attribute name="use" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="index" type="xs:string"/>
  <xs:element name="schema">
    <xs:complexType>
      <xs:attribute name="oid" use="required"/>
      <xs:attribute name="sru" use="required"/>
      <xs:attribute name="format" use="required"/>
      <xs:attribute name="encoding" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="field">
    <xs:complexType mixed="true">
      <xs:attribute name="xpath" use="required"/>
    </xs:complexType>
  </xs:element>
</xs:schema>
