<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main DTD Driver File//EN"
"/dev/null"  [
<!ENTITY % TEI.prose 'INCLUDE'>
<!ENTITY % TEI.linking 'INCLUDE'>
<!ENTITY % TEI.figures 'INCLUDE'>
<!ENTITY % TEI.analysis 'INCLUDE'>
<!ENTITY % TEI.XML 'INCLUDE'>

<!ATTLIST xref  url CDATA #IMPLIED >

<!ENTITY version    "1.0.beta" >
]>
<TEI.2>
    <teiHeader>
        <fileDesc>
            <titleStmt>
                <title>Registry Services specification: version &version;</title>
                <author>Neel Smith</author>
                <sponsor>Center for Hellenic Studies</sponsor>
            </titleStmt>
            <publicationStmt>
                <!-- one of (address authority availability date distributor idno p pubPlace publisher) -->
                <publisher> Center for Hellenic Studies</publisher>
                <date>August, 2005</date>
                <availability>
                    <p>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.
                    </p>
                </availability>
            </publicationStmt>
            <sourceDesc>
                <p>Original born-digital work.</p>
            </sourceDesc>
        </fileDesc>
    </teiHeader>
    <text>
        <body>
            <div id="preface" n="Preface">
                <head>Preface</head>
                <p>This document defines version <emph>&version;</emph> of the Registry Services
                    implementation specification. The specification defines interaction between a
                    client and server providing standard identifiers for entities in some specified
                    domain. For an overview of Registry services, see <xref
                        url="http://chs75.harvard.edu/projects/diginc/techpub/registry"
                        >http://chs75.harvard.edu/projects/diginc/techpub/registry</xref>. </p>
            </div>
            <div id="versions" n="1">
                <head>Versions</head>
                <p>Release versions are identified by two dot-separated integers, with the first
                    being most significant. E.g., "2.0" is greater than "1.10" but "1.10" is greater
                    than "1.2". </p>
                <p>Experimental, pre-release versions may also be made available from time to time.
                    An identifier for a pre-release version is composed of a regular release-version
                    number followed by a string indicating its test status (e.g., "1.2.beta" or
                    "1.2.release-candidate"). Optionally, the identifer for a test version may have
                    a further positive integer indicating its sequence in that test series (e.g.,
                    "1.2.beta.2"). </p>
                <p> A version number is a required attribute on the RegistryService element returned
                    by a <term type="code">GetCapabilities</term> request (defined below).</p>
            </div>
            <div id="communication" n="2">
                <head>Requirements for client-server communication</head>
                <p>Registry Services use the HyperText Transfer Protocol [IETF RFC 2616] for
                    communication between client and server. An instance of Registry Services
                    referred to hereafter as a Registry&apos;s "base URL" is an HTTP Uniform
                    Resource Locator (URL). This URL is not required to return any content, although
                    it is strongly recommended that a request for a Registry URL return basic
                    information identifying the Registry in either text-only or XHTML format. </p>
                <p> The Registry&apos;s base URL serves as a URL prefix for Registry requests:
                    Registry requests are formed by adding request parameters directly to the base
                    request URL. More formally, the concatenation of the base request URL with URL
                    parameters must produce a string forming a valid URL according to the
                    requirements of the URL specification [IETF RFC 2396] and the HTTP Common
                    Gateway Interface standard (CGI). Each parameter&apos;s name and value pair
                    must be separated from any following parameters by an ampersand ("&amp;",
                    Unicode x0026); name and value for each individual parameter must be separated
                    by an equals sign ("=", Unicode x003D). . All Registry requests include a URL
                    parameter named <term type="code">request</term>. The value of this parameter
                    must be the name of a request defined in version &version;. For some
                    requests, one or more additional parameters are required as defined in this
                    specification. If any of the characters "/", "&amp;", or "=" appear in the
                    value of a parameter, they must therefore be encoded as defined in IETF RFC
                    2616. In version &version;, Registry services require use of the GET method
                    for all requests. </p>
                <p>Examples of <term type="code">GetCapabilities</term> requests formed from valid
                    CTS base URLs: <term type="code">http://myhost/myregistry?</term> is a valid
                    base URL because the request string <term type="code"
                        >http://myhost/myregistry?request=GetCapabilities</term> is a valid URL.
                        <term type="code"
                    >http://myhost/myregistry?configuration=default&amp;</term> is also a valid
                    base URL because the request <term type="code"
                        >http://myhost/myregistry?configuration=default&amp;request=GetCapabilities</term>
                    is a valid URL. </p>
                <p>In addition, CTS reserves a special meaning for the period character (".",
                    Unicode x002E). When a period appears in an <term type="code">id</term>
                    parameter, it separates hierarchical components of a registry entry. If a period
                    instead represents a character in the reference value, it must be URL escaped.
                    Although the specification allows periods and hyphens to appear as literal
                    values for <term type="code">id</term> parameters, registrars managing a
                    Registry services instance are strongly discouraged from including periods in
                    the literal values of individual components of a registry id value. </p>
                <p>Parameter names and values are both case sensitive. Order of parameters in a
                    request is not significant. </p>
            </div>
            <div id="parameters" n="3">
                <head>Common parameters</head>
                <p>The following parameters are allowed or required in multiple Registery requests:</p>
                <list type="gloss">
                    <label>
                        <term type="code">registryID</term>
                    </label>
                    <item>The identifier of a Registry, required to be unique within the scope of
                        the Registry inventory returned by the <term type="code"
                        >GetCapabilities</term> request.</item>
                    <label>
                        <term type="code">ID</term>
                    </label>
                    <item>The unique identifier of an individual entry in a registry&apos;s
                        hierarchical reference scheme. The ID value of an entry is a concatenation
                        of one or more strings taken from the <term type="code">id</term> attributes
                        of successively contained elements, with each component except the last
                        joined to following components by a period (".", Unicode x002E). </item>
                </list>
            </div>
            <div id="requests" n="4">
                <head>The Registry service requests</head>
                <p>Registry Services requires implementation of six requests. These requests are
                    named <term type="code">GetCapabilities</term>, <term type="code"
                    >GetValidValues</term>, <term type="code">GetRedirects</term>, <term type="code"
                        >QueryRegistry</term> and <term type="code">DownloadRegistry</term>, and
                    include required and allowed parameters as defined in the following sections. </p>
                <p> Except for the <term type="code">DownloadRegistry</term> request, the reply to a
                    Registry request is always a well-formed XML document with a root element having
                    the same name as the request. The reply document always contains exactly two
                    elements, the first of which is named <term type="code">request</term>. The
                    format of the <term type="code">request</term> element is unspecified, and may
                    be used for any purpose the implementation wishes. As the name of the element is
                    intended to imply, it is strongly recommended that implementing software use
                    this element to report back parameters passed in with the request. Developers
                    may also use this element for other purposes such as embedding debugging
                    information in a reply that complies with the CTS specification. </p>
                <p> If the syntax and contents of request parameters do not fully comply with the
                    specifications in this document, the second element of the reply is named <term
                        type="code">error</term>; as of version &version; of the Registry
                    specification, the format and content of error reporting are left up to the
                    implementing software. Future versions of the protocol may define structures for
                    error reporting. </p>
                <p>If the syntax and contents of request parameters fully comply with the
                    specifications in this document, then the name and format of the second element
                    vary according to the request, and are defined in the following sections,
                    together with the Relax NG schemas listed in the appendix. </p>
                <div n="1">
                    <head>GetCapabilities</head>
                    <p>Purpose: the <term type="code">GetCapabilities</term> request retrieves an
                        inventory or registries managed by an instance of Registry services. </p>
                    <p>Parameters: no parameters other than the <term type="code">request</term>
                        parameter are required, but as with all Registry requests, a request may
                        optionally include a <term type="code">version</term> parameter indicating
                        the version of the protocol preferred by the client. As of version
                        &version;, servers are not required to recognize or alter their reply in
                        response to a <term type="code">version</term> parameter. </p>
                    <table>
                        <row>
                            <cell role="label">Parameter</cell>
                            <cell role="label">Required/optional</cell>
                            <cell role="label">Description</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">version</term>
                            </cell>
                            <cell>optional</cell>
                            <cell>Client may indicate preferred version of Registry protocol</cell>
                        </row>
                    </table>
                    <p>Response: validates against <term type="code">GetCapabilities.rng</term> (see
                        appendix). </p>
                </div>
                <div n="2">
                    <head>﻿GetValidValues</head>
                    <p>Purpose: the <term type="code">GetValidValues</term> request retrieves a list
                        of all unique index values satisfying a an XPath expression for a given
                        registry. If the <term type="code">query</term> parameter is omitted, <term
                            type="code">GetValidValues</term> returns a list of unique values at the
                        top level of the Registry&apos;s ID hierarchy; that is, the result is
                        equivalent to a request with the <term type="code">query</term> parameter
                        equal to <term type="code">/</term>. </p>
                    <table>
                        <row>
                            <cell role="label">Parameter</cell>
                            <cell role="label">Required/optional</cell>
                            <cell role="label">Description</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">registryID</term>
                            </cell>
                            <cell>required</cell>
                            <cell>Unique ID for a specific registry</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">query</term>
                            </cell>
                            <cell>optional</cell>
                            <cell>XPath expression limiting scope of the query</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">version</term>
                            </cell>
                            <cell>optional</cell>
                            <cell>Client may indicate preferred version of Registry protocol</cell>
                        </row>
                    </table>
                    <p>Response: validates against <term type="code">GetValidValues.rng</term> (see
                        appendix). </p>
                </div>
                <div n="3">
                    <head>﻿﻿DownloadRegistry</head>
                    <p>Purpose: the <term type="code">DownloadRegistry</term> request retrieves the
                        complete cotents of a given registry. </p>
                    <table>
                        <row>
                            <cell role="label">Parameter</cell>
                            <cell role="label">Required/optional</cell>
                            <cell role="label">Description</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">registryID</term>
                            </cell>
                            <cell>required</cell>
                            <cell>Unique ID for a specific registry</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">version</term>
                            </cell>
                            <cell>optional</cell>
                            <cell>Client may indicate preferred version of Registry protocol</cell>
                        </row>
                    </table>
                    <p>Response: validates against <term type="code">Registry.rng</term> (see
                        appendix). </p>
                    <p/>
                </div>
                <div n="4">
                    <head>﻿﻿﻿GetRedirects</head>
                    <p>Purpose: the <term type="code">GetRedirects</term> request retrieves all
                        identifier records that have been redirected to a given ID. </p>
                    <table>
                        <row>
                            <cell role="label">Parameter</cell>
                            <cell role="label">Required/optional</cell>
                            <cell role="label">Description</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">registryID</term>
                            </cell>
                            <cell>required</cell>
                            <cell>Unique ID for a specific registry</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">ID</term>
                            </cell>
                            <cell>required</cell>
                            <cell>Unique ID for a registry entry, expressed in dot-separated format
                                for entries deeper than the top level of the registry
                            hierarchy.</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">version</term>
                            </cell>
                            <cell>optional</cell>
                            <cell>Client may indicate preferred version of Registry protocol</cell>
                        </row>
                    </table>
                    <p>Response: validates against <term type="code">GetRedirects.rng</term> (see
                        appendix). </p>
                </div>
                <div n="5">
                    <head>﻿﻿﻿﻿QueryRegistry</head>
                    <p>Purpose: the <term type="code">QueryRegistry</term> request may be used
                            <emph>either</emph> to retrieve an identifier record for a specific ID
                        value, if the optional <term type="code">ID</term> parameter is include;
                            <emph>or</emph> to search the description element of an identifier
                        record if the optional <term type="code">description</term> parameter is
                        included. One and only one of <term type="code">ID</term> and <term
                            type="code">description</term> is required. </p>
                    <table>
                        <row>
                            <cell role="label">Parameter</cell>
                            <cell role="label">Required/optional</cell>
                            <cell role="label">Description</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">registryID</term>
                            </cell>
                            <cell>required</cell>
                            <cell>Unique ID for a specific registry</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">ID</term>
                            </cell>
                            <cell>one of <term type="code">ID</term> and <term type="code"
                                    >description</term> is required</cell>
                            <cell>Unique ID for a registry entry, expressed in dot-separated format
                                for entries deeper than the top level of the registry
                            hierarchy.</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">description</term>
                            </cell>
                            <cell>one of <term type="code">ID</term> and <term type="code"
                                    >description</term> is required</cell>
                            <cell>string to search for in entry description</cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">querytype</term>
                            </cell>
                            <cell>may optionally be used along with <term type="code"
                                >description</term> parameter </cell>
                            <cell>a value of <term type="code">wholeword</term> indicates that the
                                search should only return descriptions where <term type="code"
                                    >description</term> appears as a word bounded by white space or
                                puncutation; a value of <term type="code">substring</term> indicates
                                that the search should return all descriptions containing the string
                                    <term type="code">description</term>. </cell>
                        </row>
                        <row>
                            <cell role="data">
                                <term type="code">version</term>
                            </cell>
                            <cell>optional</cell>
                            <cell>Client may indicate preferred version of Registry protocol</cell>
                        </row>
                    </table>
                    <p>Response: validates against <term type="code">QueryRegistry.rng</term> (see
                        appendix). </p>
                </div>
            </div>
            <div id="dtds" n="5">
                <head>The Registry Schemas</head>
                <p>The following list of Relax NG schemas define the syntax of Registry service
                    replies, and are included by reference as part of the Registry Services
                    specification. </p>
                <list>
                    <item>GetCapabilities.rng </item>
                    <item>GetValidValues.rng </item>
                    <item>Registry.rng </item>
                    <item>GetRedirects.rng</item>
                    <item>QueryRegistry.rng</item>
                </list>
            </div>
        </body>
    </text>
</TEI.2>
