<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
    xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
    <!--
        
        Relax NG schema for a reference index inventory :  part of the Reference Indexing services protocol.
        
        Copyright 2006 Neel Smith and licensed under the Creative Commons
        Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit
        http://creativecommons.org/licenses/by-nc-sa/1.0/ or send a letter to Creative Commons,
        559 Nathan Abbott Way, Stanford, California 94305, USA.
        
        Originally prepared by Neel Smith, College of the Holy Cross:  nsmith@holycross.edu
        
        Currently maintained by Neel Smith for the Center for Hellenic Studies.
    -->
    <!--    This is the schema for the inventory of indices included as the body 
            of the Reference Index GetCapabilities reuqest.
    -->
    <define name="index">

        <element name="index">
            <attribute name="id"/>
            <element name="label">
                <text/>
            </element>
            <externalRef href="idxstructure.rng"/>
        </element>
    </define>



    <start>
        <element name="IndexService">
            <attribute name="version">
                <choice>
                    <value>1.0.beta</value>
                </choice>
            </attribute>
            <optional>
                <attribute name="id"/>
            </optional>

            <externalRef href="indexmetadata.rng"/>

            <oneOrMore>
                <ref name="index"/>
            </oneOrMore>
        </element>
    </start>
</grammar>
