<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <include href="common.rng"/>
  <start>
    <ref name="BioMOBY"/>
  </start>
  <define name="BioMOBY">
    <element name="biomoby">
      <ref name="Service"/>
    </element>
  </define>
  <define name="InvocationHead" combine="interleave">
    <!--
      the biomobyInvocation part contains information that is needed in case the XML is used to invoke a
      bioMOBY Web Service
    -->
    <element name="biomobyInvocation">
      <a:documentation>bioMOBY invocation parameters</a:documentation>
      <interleave>
        <element name="authURI">
          <a:documentation>organization URI</a:documentation>
          <data type="anyURI"/>
        </element>
        <element name="registry">
          <a:documentation>bioMOBY registry</a:documentation>
          <interleave>
            <element name="endpoint">
              <a:documentation>registry endpoint</a:documentation>
              <data type="anyURI"/>
            </element>
            <optional>
              <element name="namespace">
                <a:documentation>registry namespace</a:documentation>
                <data type="anyURI"/>
              </element>
            </optional>
          </interleave>
        </element>
      </interleave>
    </element>
  </define>
</grammar>
