<!DOCTYPE TEI.2 PUBLIC '-//TEI//DTD TEI Lite 1.0//EN'
    "http://www.w3.org/People/cmsmcq/2002/tuebingen/dtd/teixlite.dtd" [

<!ENTITY date.last.touched "22 December 2005">

<!ENTITY eacute  "&#233;" ><!-- small e, acute accent -->
<!ENTITY ndash  "&#x2013;" ><!--=en dash-->

<!ENTITY and    "&#x2227;" ><!--/wedge /land B: =logical and-->
<!ENTITY equiv  "&#x2261;" ><!--/equiv R: =identical with-->
<!ENTITY exist  "&#x2203;" ><!--/exists =at least one exists-->
<!ENTITY forall "&#x2200;" ><!--/forall =for all-->
<!ENTITY isin   "&#x2208;" ><!--/in R: =set membership-->
<!ENTITY ne     "&#x2260;" ><!--/ne /neq R: =not equal-->
<!ENTITY not    "&#xAC;" ><!--/neg /lnot =not sign-->
<!ENTITY or     "&#x2228;" ><!--/vee /lor B: =logical or-->
<!ENTITY rArr   "&#x21D2;" ><!--/Rightarrow A: =implies-->
<!ENTITY times  "&#215;" ><!--/times B: =multiply sign-->

<!ENTITY exists  "&exist;" >
<!ENTITY descrip "&#x2129;" ><!--* U+2129: inverted iota *-->
<!ENTITY exists1 "&exist;<hi rend='sup'>1</hi>" >
<!ENTITY iff     "&equiv;" >
<!ENTITY implies "&rArr;" >
<!ENTITY in      "&isin;" >
<!ENTITY neq     "&ne;" >
<!ENTITY lab     "&#x2329;">
<!ENTITY rab     "&#x232A;">

<!ENTITY d '<ident>d</ident>'>
<!ENTITY i '<ident>i</ident>'>
<!ENTITY p '<ident>p</ident>'>
<!ENTITY P '<ident>P</ident>'>
<!ENTITY q '<ident>q</ident>'>
<!ENTITY Q '<ident>Q</ident>'>
<!ENTITY r '<ident>r</ident>'>
<!ENTITY R '<ident>R</ident>'>
<!ENTITY s '<ident>s</ident>'>
<!ENTITY t '<ident>t</ident>'>
<!ENTITY T '<ident>T</ident>'>
<!ENTITY u '<ident>u</ident>'>
<!ENTITY x '<ident>x</ident>'>

<!ENTITY nbsp '&#xA0;'>
<!ENTITY tab '&nbsp;&nbsp;&nbsp;'>

<!ATTLIST bibl id ID #IMPLIED 
               n CDATA #IMPLIED
>
<!ATTLIST div  id ID #IMPLIED >
    ]>
<?xml-stylesheet href="../../../People/cmsmcq/lib/tltohtml.xsl" type="text/xsl"?>
<!--* <?xml-stylesheet href="http://www.w3.org/People/cmsmcq/2001/tltohtml.xsl" type="text/xsl"?> *-->
<!--* "/SGML/Public/TEI/Derived/xmllite.dtd"> *-->
<!--* "http://www.hcu.ox.ac.uk/TEI/Lite/DTD/teixlite.dtd"> *-->
<TEI.2>
<teiHeader>
<fileDesc>
<titleStmt>
<title>Interpretation of OAI 2.0 Markup</title>
<author>C. M. Sperberg-McQueen</author>
<!--* <author>Eric Miller</author> *-->
</titleStmt>
<publicationStmt>
<p>Unpublished.</p>
</publicationStmt>
<sourceDesc>
<p>Created in electronic form.</p>
</sourceDesc>
</fileDesc>
<revisionDesc>
<list>
<item>2006-04-20 : CMSMcQ : add comment with pointer to more info and samples
of OAI data; correct dates in this revision history (all the years were mistyped
'2004')</item>
<item>2005-12-22 : CMSMcQ : get rid of the is predicate</item>
<item>2005-12-20 : CMSMcQ : revise the proposal for definite descriptions</item>
<item>2005-12-19 : CMSMcQ : correct some typos, add this revision history based on
CVS checkins</item>
<item>2005-09-26 : CMSMcQ : ? (this was just after MLCD Bergen meeting, I 
doubt it can have been any major change)</item>
<item>2005-05-04 : CMSMcQ : tweaks</item>
<item>2005-05-03 : CMSMcQ : tweaks</item>
<item>2005-03-31 : CMSMcQ : acks</item>
<item>2005-03-30 : CMSMcQ : getRecord, editorial notes</item>
<item>2005-03-29 : CMSMcQ : definite descriptions</item>
<item>2005-03-25 : CMSMcQ : add error element</item>
<item>2005-03-24 : CMSMcQ : first intallment, through request element</item>
</list>
</revisionDesc>
</teiHeader>
<text>
<front>
<titlePage>
<docTitle>
<titlePart>The meaning of OAI 2.0 Markup</titlePart>
<titlePart>An exercise in markup interpretation</titlePart>
</docTitle>

<docAuthor>C. M. Sperberg-McQueen</docAuthor>
<!--* <docAuthor>Eric Miller</docAuthor> *-->
<docDate>&date.last.touched;</docDate>

<titlePart>$Id: ioai.xml,v 1.18 2008/05/18 13:02:16 cmsmcq Exp $</titlePart>
</titlePage>
</front>
<body>
<p>This document shows the translation of markup in the vocabulary
defined by the Open Archives Initiative Protocol for Metadata
Harvesting 2.0 <ptr target="oai-2.0" type="bibref"/> (which we will refer to simply as
<mentioned>OAI</mentioned> for brevity) into logical form. It is
intended as an exercise in the formal description of the meaning of
markup, and assumes the proposal made by <ptr type="bibref"
target="hrsm"/> that the meaning of markup may be described formally
as the set of inferences licensed by that markup.<note place="foot">
Thanks are due to my colleague Eric Miller for discussions of
the OAI vocabulary and of the general topic of schema annotations;
the idea of a formal description of the OAI vocabulary arose
in the context of our collaborative work on schema annotation.
Thanks are also due to Claus Huitfeldt, Allen Renear, and David Dubin,
my collaborators on the so-called <soCalled>Bechamel</soCalled> 
project on markup semantics.  The core of this paper is an attempt
to apply to the OAI vocabulary the description techniques we have
been exploring in the Bechamel project.</note>
</p>
<p>The meaning of the markup is given here in the form of sentence
schemata for sentences in first-order predicate calculus form. The
sentence schemata (or <soCalled>skeleton sentences</soCalled>) have
blanks, here represented by XPath expressions enclosed in braces.
When a predicate-calculus representation of the meaning of
an OAI document is to be generated, the sentence schemata are made
into sentences by <list type="ordered">
<item>visiting each element (and conceivably each attribute) of the
document in turn (call the item being visited <ident>E</ident>),</item>
<item>identifying the sentence schema (or schemata) associated
with <ident>E</ident> (in the most common case, this is a simple
match on generic identifier or attribute name; in other cases,
a more complex match pattern may be required),</item>
<item>evaluating each XPath expression in the sentence schemata,
using <ident>E</ident> as the current node, and</item>
<item>filling in each blank in the sentence with the value thus
obtained.</item>
</list>
Each element in the document generates a set of sentences
in this way;
the inferences licensed by the markup in the document are
the set of sentences thus generated.
</p>
<p>Some generalizations are true for all conforming OAI data
providers; these might be identified as consequences of the
<ident>OAI-PMH</ident> element, on the theory that they follow from
(are licensed as inferences by) the proposition that the server
conforms to the OAI-PMH specification, and that it is through the use
of the <ident>OAI-PMH</ident> element that we can plausibly infer that
the server conforms.  Alternatively they can be treated as knowledge
about the world and conforming OAI implementations (<q>Conforming OAI
repositories either do not maintain information about deletions, or
else maintain persistent about deletions, or else maintain transient
information about deletions</q>).  Here, the generalizations are
given as conditionals whose consequent is true for all conforming
OAI repositories.</p>
<p>In section <ptr target="ltsd" type="secnum"/>, each element and
attribute in the OAI vocabulary is described using prose paraphrases
and sentence schemata. Generalizations (world knowledge) are given
in passing at what seem like opportune locations.
Summaries of the types
and relations used in the logical translation are given in sections
<ptr target="types" type="secnum"/> and <ptr target="rels"
type="secnum"/>. The logical notation used is described in section
<ptr target="notn" type="secnum"/>.
</p>

<note place="block"><p>This document is unfinished.</p>
<p>At the moment, only a small number of the elements of the OAI vocabulary are
described.  The list of relevant types and relations is similarly
incomplete.  The author's plan is to proceed through the rest of the
vocabulary, supplying prose paraphrases and translations into predicate
calculus and augmenting the lists of types and relations as needed.</p>
<p>Separate documents, or possibly later versions of this paper, may
be expected to supply Prolog and RDF versions of the sentence
schemata given here, and XSLT code to generate full sentences
from document instances using the vocabulary.</p></note>

<!--*
For more information about OAI:

MSM's old notes and some sample data from Indiana are in
/home/www.w3/2003/g/cc/oai.indiana.sample.xml

A list of 'distinct metadata schemas' encountered by the experimental
OAI Repository in Urbana is at
http://gita.grainger.uiuc.edu/registry/ListSchemas.asp

*-->

<div id="ltsd">
<head>Interpretation of elements and attributes</head>

<div id="OAI-PMH">
<head>The <ident>OAI-PMH</ident> element</head>
<p>The <ident>oai:OAI-PMH</ident> element contains the response sent
by an OAI server in response to a particular request at a
specified time.  For example:<eg><![CDATA[
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
  http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
  <responseDate>2002-05-01T19:20:30Z</responseDate>
  <request verb="GetRecord" 
    identifier="oai:arXiv.org:hep-th/9901001"
    metadataPrefix="oai_dc"
    >http://an.oa.org/OAI-script</request> 
  <GetRecord>
    <record>
      ...
    </record>
  </GetRecord> 
</OAI-PMH>]]></eg></p>
<p>We can infer:<list type="bullets">
<item>There exists an OAI server &s;, 
whose URI is the <kw>#PCDATA</kw>
value of the <ident>oai:request</ident> child.</item>
<item>There exists a request <ident>q</ident>, which is modeled by the
<ident>oai:request</ident> child element.</item>
<item>There an OAI response <ident>r</ident>, which is identical to (<emph>not</emph> 
<q>modeled by</q>) the current <ident>oai:OAI-PMH</ident> element.</item>
<item>There exists a moment of time <ident>t</ident> identified by the
value of the <ident>oai:responseDate</ident> child element.</item>
<item>Server &s; sent response <ident>r</ident> in 
response to request <ident>q</ident> at time <ident>t</ident>.</item>
</list>
Or more compactly (if also more awkwardly):
<q>The <ident>oai:OAI-PMH</ident> element was sent 
as an OAI response,
by the server identified by the content of <ident>oai:request</ident>,
in response to the request described by <ident>oai:request</ident>,
at the moment denoted by <ident>oai:responseDate</ident>.</q>
</p>
<p>More formally:
<q rend="display">(&exists; &q; : OAI-request)
(&exists; &r; : OAI-response)
(&exists; &s; : OAI-server)
(&exists; &t; : moment)
<lb/>
(uri_server({string(./oai:request)}, &s;)<lb/>
&and; models({./oai:request}, &q;)<lb/>
<!--* &and; is({.}, &r;)<lb/> *-->
&and; {.} = &r;<lb/>
&and; xsd_lv(xsd:dateTime, {string(./oai:responseDate)}, &t;)<lb/>
&and; served_response(&q;,&s;,&t;,&r;))
</q>
(Details of the notation are given in section 
<ptr target="notn" type="secnum"/>.)</p>
<p>If we use XPointer tumblers to denote elements (as needed 
for the first argument of the <ident>models</ident> relation) 
and quoted literals to represent strings, 
<!--* and (<ident>typename</ident>) &lsquo;xxx&rsquo; to represent 
the typed value in the value space of type <ident>typename</ident> 
denoted by the string "xxx", *-->
then the example given above would generate the following sentence
in logical notation:
<q rend="display">(&exists; &q; : OAI-request)
(&exists; &r; : OAI-response)
(&exists; &s; : OAI-server)
(&exists; &t; : moment)
<lb/>
(uri_server(<q><code>http://an.oa.org/OAI-script</code></q>, &s;)<lb/>
&and; models(<code>element(/1/2)</code>, &q;)<lb/>
<!--* &and; is(<code>element(/1)</code>, &r;)<lb/> *-->
&and; <code>element(/1)</code> = &r;<lb/>
&and; xsd_lv(xsd:dateTime, <q><code>2002-05-01T19:20:30Z</code></q>, &t;)<lb/>
&and; served_response(&q;,&s;,&t;,&r;))
</q></p>
</div>
<div>
<head>A digression on definite descriptions</head>

<p>If we want to be careful to capture the meaning of the
definite articles in the English paraphrase, we may be
troubled by the translation above.  In English, we spoke of
<q><emph>the</emph> request</q>, <q><emph>the</emph> server</q>,
and so on:  the descriptions (it is implied) uniquely
identify a single request, a single server.  To capture
this information, we can
use a slightly more elaborate translation:
<q rend="display">(&exists; &q; : OAI-request)
(&exists; &r; : OAI-response)
(&exists; &s; : OAI-server)
(&exists; &t; : moment)
<lb/>(uri_server({string(./oai:request)}, &s;) 
<lb/>&tab; &and; (&forall; &x;)(uri_server({string(./oai:request)}, &x;) &implies; &x; = &s;) 
<lb/>&tab; &and; (&forall; &x;)(uri_server(&x;, &s;) &implies; &x; = {string(./oai:request)}) 
<lb/>&and; models({./oai:request}, &q;)
<lb/>&tab; &and; (&forall; &x;)(models({./oai:request}, &x;) &implies; &x; = &q;) 
<!--* <lb/>&and; is({.}, &r;) *-->
<lb/>&and; {.} = &r;
<lb/>&and; xsd_lv(xsd:dateTime, {string(./oai:responseDate)}, &t;)
<lb/>&tab; &and; (&forall; &x;)(xsd_lv(xsd:dateTime, {string(./oai:responseDate)}, &x;)
&implies; &x; = &t;) 
<lb/>&and; served_response(&q;,&s;,&t;,&r;))
</q>
Here the indented clauses have been added vis-a-vis the previous
translation.
</p>
<p>
In prose, <q rend="display">There exist an OAI request &q;, an OAI response &r;, an
OAI server &s;, and a moment in time &t;, such that:
<list type="bullets">
<item>The string value of the <ident>oai:request</ident> child is the
URI of &s; (and there is only one such server, i.e. any server whose
URI is that string value is identical to &s;, and also that server has
only one URI, i.e. any URI which is the URI of &s; is that string
value).</item>
<item>The request &q; is modeled by the <ident>oai:request</ident> 
child (and there is only one such request).</item>
<item>The response &r; is the same as the current (<ident>oai:OAI-PMH</ident>)
element.</item>
<item>The moment &t; is the moment identified by the
string value of the <ident>oai:responseDate</ident> child,
interpreted according to the usual lexical mapping of the
XML Schema <ident>dateTime</ident> type (and there is only one
such moment).</item>
<item>Server &s; served response &r; to request &q; at moment &t;.</item>
</list>
</q>
</p>

<p>If we use the <soCalled>description operator</soCalled> 
(<q>&#x2129;</q>) 
introduced by Russell and used since by others (e.g.
<ptr target="quine.ml" type="bibref"/> and 
<ptr target="quine.methods" type="bibref"/>)
to allow terms corresponding to phrases
like <q>the moment denoted by <ident>oai:responseDate</ident></q> to
appear as arguments, we'll have<note place="foot">In passing, it may
be noted that this translation moves the type information associated
with &q;, &s;, and &t; into the descriptions; it omits for convenience
the clause (<q>(&forall; &x;)(uri_server(&x;, &s;) &implies; &x; =
{string(./oai:request)})</q>) which claims that a given server has
only a single URI.</note>
<q rend="display">
(&exists; &r; : OAI-response)
<!--* <lb/>(is({.}, &r;) *-->
<lb/>{.} = &r;
<lb/>&and; served_response(
<lb/>&tab; (&descrip; &q;)(OAI-request(&q;) &and; models({./oai:request}, &q;)),
<lb/>&tab; (&descrip; &s;)(OAI-server(&s;) &and; uri_server({string(./oai:request)}, &s;)
<lb/>&tab;&tab;&tab;&tab; &and; (&forall; &x;)(uri_server(&x;, &s;) 
&implies; &x; = {string(./oai:request)})),
<lb/>&tab; (&descrip; &t;)(moment(&t;) &and; xsd_lv(xsd:dateTime, {string(./oai:responseDate)}, &t;)),
<lb/>&tab; &r;))
</q>
</p>
<p>Although this form of expression is more compact, some readers also
find it harder to follow (as does the author), in part because 
replacing simple variables like &q; with expressions like
<q>(&descrip; &q;)(OAI-request(&q;) &and; models({./oai:request}, &q;))</q>
makes it harder to read the larger expressions in which the reference
is made.
An alternative which some find more legible
is offered by the notation suggested by <ptr target="niml" type="bibref"/>, in 
which &descrip; is
treated as a kind of quantifier:
<q rend="display">
(&exists; &r; : OAI-response)
<lb/>&tab; (&descrip; &q; (OAI-request(&q;) &and; models({./oai:request}, &q;)))
<lb/>&tab; (&descrip; &s; (OAI-server(&s;) &and; uri_server({string(./oai:request)}, &s;)))
<lb/>&tab; (&descrip; &t; (moment(&t;) &and; xsd_lv(xsd:dateTime, {string(./oai:responseDate)}, &t;)))
<lb/>((&forall; &x;)(uri_server(&x;, &s;) &implies; &x; = {string(./oai:request)}) 
<!--* <lb/>&tab; &and; is({.}, &r;) *-->
<lb/>&tab; &and; {.} = &r;
<lb/>&tab; &and; served_response(&q;,&s;,&t;,&r;))
</q>
In prose paraphrase, this works out to something like
<q>There exists an OAI response &r; such that
there exist (a) a unique OAI request &q; modeled by
the <ident>oai:request</ident> child element,
(b) a unique OAI server whose URI is the
string value of the <ident>oai:request</ident> child element,
and (c) a unique moment &t; which is mapped to 
from the string value of the <ident>oai:responseDate</ident> child
using the lexical mapping for <ident>xsd:dateTime</ident>, 
such that 
server &s; served response &r; to request &q; at moment &t;.
</q></p>
<p>It may be just a question of what one is accustomed to, but some
readers may feel that the quantifiers have become top-heavy here.</p>
<!--* <p>The Hughes and Cresswell notation, although not favored by
all other authors, seems both more compact than the
first translation given in this section and more readable
than the alternative.</p> *-->


<p>In some cases, of course, a general knowledge of which relations
are functions can eliminate the need for writing out the additional
clauses, or allow us to automate the task.  For example, if we
adopt the axiom that<q rend="display">(&forall; &s; : OAI-server)
(&forall; &u; : string)
(uri_server(&u;, &s;) &implies;
(&forall; &x;)(uri_server(&u;, &x;) &implies; &x; = &s;) 
&and; (&forall; &x;)(uri_server(&x;, &s;) &implies; &x; = &u;))
</q>
(i.e. both the relation <ident>uri_server</ident> and its inverse are
functions), then the relative uniqueness of the arguments need not be
asserted each time the relation is used.  It is an empirical question,
whose answer is not currently clear, whether all definite descriptions
in our logical translation can be handled in this way.
</p>

<p>In what follows, we will usually omit any attempt to
capture claims of uniqueness, unless they seem particularly
interesting.  When we do attempt to capture them, we will use a 
variant on the Russell/Quine notation which attempts to retain
the legibility of expressions like <q>served_response(&q;,&s;,&t;,&r;)</q>
and which follows the convention of giving types for variables 
quantified by &descrip;:
<q rend="display">
(&exists; &q; : OAI-request)
(&exists; &r; : OAI-response)
(&exists; &s; : OAI-server)
(&exists; &t; : moment)
<lb/>( &q; = (&descrip; &q; : OAI-request)(models({./oai:request}, &q;))
<lb/>&tab; &and; &s; = (&descrip; &s; : OAI-server)(uri_server({string(./oai:request)}, &s;))
<lb/>&tab; &and; &t; = (&descrip; &t; : moment)(xsd_lv(xsd:dateTime, {string(./oai:responseDate)}, &t;))
<lb/>&tab; &and; (&forall; &x;)(uri_server(&x;, &s;) &implies; &x; = {string(./oai:request)})
<lb/>&tab; &and; {.} = &r;
<lb/>&tab; &and; served_response(&q;,&s;,&t;,&r;))</q>
</p>
</div>

<div id="responseDate">
<head>The <ident>responseDate</ident> element</head>
<p>The <ident>oai:responseDate</ident> element indicates the
date and time the response was sent.  Its meaning has been
captured in the rule for <ident>oai:OAI-PMH</ident>, but
if we wish to have an independent rule for each element type,
then we can say that from an <ident>oai:responseDate</ident>
element we can infer that the response consisting of the 
parent <ident>oai:OAI-PMH</ident> element was sent by 
the responsible server at the time indicated.  Formally:
<q rend="display">(&exists; &t; : moment)
(&exists; &r; : OAI-response)
<lb/>(xsd_lv(xsd:dateTime, {string(.)}, &t;)
<lb/>&and; &r; = {..}
<lb/>&and; was_sent_at(&r;,&t;))</q>
</p>
<p>For example:<eg><![CDATA[<responseDate>2002-05-01T19:20:30Z</responseDate>]]></eg></p>
</div>

<div id="request">
<head>The <ident>request</ident> element</head>
<p>The <ident>oai:request</ident> element indicates what request
generated the enclosing <ident>oai:OAI-PMH</ident> response. The
content (of simple type <ident>xsd:anyURI</ident>) gives the base URI
of the request, and thus the URI we use here to identify the
server.<note place="foot"><p>The author is not absolutely certain, after
reading the documentation, whether
identifying the base URI of the request with <q>the</q> URI of the
server is completely kosher.</p></note> The attributes document the
key/value pairs of the request; there will always be a
<ident>verb</ident> attribute, and in a correct request the other
attributes will vary with the verb.</p>
<p>For example:<eg><![CDATA[<request verb="GetRecord" 
  identifier="oai:arXiv.org:cs/0112017"
  metadataPrefix="oai_dc"
  >http://arXiv.org/oai2</request>]]></eg></p>
<p>We can infer:<list type="bullets">
<item>There is a request, which is modeled by this element.</item>
<item>When the request is valid, the verb of the request was that
given in the <ident>verb</ident> attribute, and the other key/value
pairs of the request are all and only those given in the other
attributes.</item>
<item>When the request raises a <kw>badVerb</kw> or
<kw>badArgument</kw> error, no key/value pairs of the request are
given; the only information is the base URL of the request.</item>
<item>When the request is not valid in some other way (i.e. it raises
an error or exception condition other than <kw>badVerb</kw> or
<kw>badArgument</kw>), the specification appears to leave the behavior
undefined.</item>
</list>
</p>
<p>More formally:<q rend="display">(&exists; &q; : OAI-request)
(models({ . }, &q;)
<lb/>&and; ( {string(@verb)} &neq; "" &implies; request_verb(&q;, {string(@verb)}) )
<lb/>&and; ( ( {string(@verb)} = "GetRecord"
<lb/>&tab; &and; request_identifier(&q;, {string(@identifier)})
<lb/>&tab; &and; request_metadataPrefix(&q;, {string(@metadataPrefix)}) )
<lb/>&or; ( {string(@verb)} = "Identify" 
<lb/>&tab; &and; {count(@*)} = 0 
)
<lb/>&or; ( {string(@verb)} = "ListIdentifiers" 
<lb/>&tab; &and; request_from(&q;, {string(@from)})
<lb/>&tab; &and; request_until(&q;, {string(@until)}) 
<lb/>&tab; &and; request_metadataPrefix(&q;, {string(@metadataPrefix)}) 
<lb/>&tab; &and; request_set(&q;, {string(@set)}) 
<lb/>&tab; &and; request_resumptionToken(&q;, {string(@resumptionToken)}) 
)
<lb/>&or; ( {string(@verb)} = "ListMetadataFormats" 
<lb/>&tab; &and; request_identifier(&q;, {string(@identifier)})
)
<lb/>&or; ( {string(@verb)} = "ListRecords" 
<lb/>&tab; &and; request_from(&q;, {string(@from)})
<lb/>&tab; &and; request_until(&q;, {string(@until)}) 
<lb/>&tab; &and; request_metadataPrefix(&q;, {string(@metadataPrefix)}) 
<lb/>&tab; &and; request_set(&q;, {string(@set)}) 
<lb/>&tab; &and; request_resumptionToken(&q;, {string(@resumptionToken)}) 
)
<lb/>&or; ( {string(@verb)} = "ListSets" 
<lb/>&tab; &and; request_resumptionToken(&q;, {string(@resumptionToken)}) 
) )
</q>
</p>
<p><note place="block">The <ident>resumptionToken</ident> mechanism is
not dealt with satisfactorily in this version of this paper.</note>
</p>
</div>

<div id="error"><head>The <ident>error</ident> element</head>
<p>The <ident>oai:error</ident> element appears as the third child
(after <ident>responseDate</ident> and <ident>request</ident> when
the request raises an error condition.
For example, a request with an unknown verb might return:<note place="foot">Only
<q>might</q>, because although conforming processors are required
to use <kw>badVerb</kw> as the value of the <ident>code</ident>
attribute, the textual content of the element is not constrained.</note>
<eg><![CDATA[<error code="badVerb">Illegal OAI verb</error>]]></eg></p>
<p>We can infer:<list type="bullets">
<item>The request which elicited this response was invalid.</item>
<item>The specific error was the one indicated in keyword form
by the <ident>code</ident> attribute.</item>
<item>The specific error was the one describe in natural language
by the <kw>#PCDATA</kw> content, if any.</item>
<item></item>
</list>
</p>
<p>More formally:<q rend="display">(&exists; &q; : OAI-request)
(models({preceding-sibling::oai:request}, &q;)
<lb/>&and; invalid(&q;)
<lb/>&and; request_error(&q;, {string(@code)})
<lb/>&and; ({string(.)} &neq; "" &implies; error_nldesc(&q;, {string(.)}) )
)
)
</q></p>
<p>For detailed description of the errors, see the OAI specification;
we won't go into more detail about the errors here.</p>
</div>

<div id="GetRecord"><head>The <ident>GetRecord</ident> element</head>

<p>The <ident>oai:GetRecord</ident> element contains the response of
the server to a successful request to fetch a particular metadata
record.</p>

<p>Note that the OAI vocabulary carefully distinguishes three
things:
<list type="bullets">
<item>the <term>resource</term> described by the metadata, which might be a
document held by a library or archive (e.g. an autograph letter)</item>
<item>the <term>item</term> for which a record is requested</item>
<item>the <term>metadata record</term> actually returned by the
server</item>
</list>
The item may be thought of as a sort of abstract record; conceptually
it is a constituent part of a <term>repository</term>, but by
<mentioned>repository</mentioned> the OAI documentation means an OAI
server, not the library or archive or project or other institution
which might hold a collection of physical documents or similar objects
and which might be running the server to provide descriptions of those
objects.  Each item corresponds to a single resource and may provide
metadata in multiple formats.  So a MARC record, a Dublin Core record,
and other metadata records may share the same item identifier; a
particular metadata record is uniquely identified not by the item
identifier, but by the item identifier (each item is guaranteed to
have one), plus the <term>metadata prefix</term> (an identifier for a
given metadata format), plus the datestamp showing when the record was
created or last changed.<note place="foot">Strictly speaking, if the
metadata record is uniquely identified by the triple (item id,
metadata prefix, datestamp), then a change in the datestamp invariably
denotes the creation of a new record, and so no record can ever be
changed.  For the sake of readers less pedantic than the author
of this paper, the OAI documentation does not
insist on this point.</note>
</p>
<p>A <ident>GetRecord</ident> request must specify an item
identifier and a metadata format; the <ident>oai:GetRecord</ident>
element contains an <ident>oai:record</ident> element which
represents the item.</p>
<p>If the request is faulty (e.g. because the identifier is not known
or because the requested metadata format is not available), an
<ident>oai:error</ident> element is returned, not a
<ident>GetRecord</ident> element.  (If the particular metadata record
requested has been deleted, a record will be returned with
<code>status="deleted"</code> in the record header.)
So from the existence of a <ident>GetRecord</ident> element,
we can infer:<list type="bullets">
<item>The verb of the request was <kw>GetRecord</kw>.
(N.B. this is redundant with the <ident>verb</ident>
attribute on the <ident>oai:request</ident> element.)</item>
<item>The request raised no error and no exception.
(This may be thought redundant with the absence of an
<ident>error</ident> element.)
</item>
<item>The item requested exists in the repository.</item>
<item>The metadata format requested exists for the requested item 
in the repository, or did exist before the record was deleted.</item>
</list>
Note that we need, for these inferences, to be able
to refer to <q>the current response</q>,
<q>the request which elicited the current response</q>,
<q>the repository which emitted the current response</q>,
etc.
In the paraphrase below, we assume a set of relations which
pair the OAI response (the ancestor <ident>oai:OAI-PMH</ident>
element) with other relevant objects.</p>
<p>Formally,
<!--* <q rend="display">(&descrip; &q; (OAI-request(&q;) &and;
req_resp(&q;,{ancestor::oai:OAI-PMH})))
<lb/>(&descrip; &s; (oai-server(&s;) &and;
resp_server({ancestor::oai:OAI-PMH}, &s;)))
<lb/>(&descrip; &d; (string(&d;) &and;
request_identifier(&q;, &d;)))
<lb/>(&descrip; &i; (oai-item(&s;) &and;
item_id(&i;, &d;)))
<lb/>(&descrip; &p; (string(&p;) &and;
request_metadataPrefix(&q;, &p;)))
<lb/>(request_verb(&q;, "GetRecord")
<lb/>&and; errorfree(&q;)
<lb/>&and; isin_repository_item(&s;, &i;)
<lb/>&and; hasformat_repository_item_format(&s;, &i;, &p;)
)
</q> *-->
<q rend="display">(&exists; &q; : OAI-request)
(&exists; &s; : oai-server)
(&exists; &d; : string)
(&exists; &i; : oai-item)
(&exists; &p; : string)
<lb/>(&q; = 
(&descrip; &q; : OAI-request)(req_resp(&q;,{ancestor::oai:OAI-PMH}))
<lb/>&tab;  &s; = 
(&descrip; &s; : oai-server)(resp_server({ancestor::oai:OAI-PMH}, &s;))
<lb/>&tab;  &d; = 
(&descrip; &d; : string)(request_identifier(&q;, &d;))
<lb/>&tab;  &i; = 
(&descrip; &i; : oai-item)(item_id(&i;, &d;))
<lb/>&tab;  &p; = 
(&descrip; &p; : string(&p;)(request_metadataPrefix(&q;, &p;))
<lb/>&and; request_verb(&q;, "GetRecord")
<lb/>&and; errorfree(&q;)
<lb/>&and; isin_repository_item(&s;, &i;)
<lb/>&and; hasformat_repository_item_format(&s;, &i;, &p;)
)
</q>
In addition, we know in practice that the 
<ident>oai:record</ident> child of <ident>oai:GetRecord</ident>
contains the requested metadata record in the requested format 
for the requested item.  But it's more convenient to capture
that in the sentence schemata for the <ident>oai:record</ident>
element than here.
</p>

</div>

<!--*
<div id="record"><head>The <ident>record</ident> element</head>
<p>The <ident>oai:record</ident> element ...</p>
</div>

<div id="Identify"><head>The <ident>Identify</ident> element</head>
<p>The <ident>oai:Identify</ident> element ...</p>
</div>

<div id="baseURL"><head>The <ident>baseURL</ident> element</head>
<p>The <ident>oai:baseURL</ident> element ...</p>
</div>

<div id="protocolVersion"><head>The <ident>protocolVersion</ident> element</head>
<p>The <ident>oai:protocolVersion</ident> element ...</p>
</div>

<div id="adminEmail"><head>The <ident>adminEmail</ident> element</head>
<p>The <ident>oai:adminEmail</ident> element ...</p>
</div>

<div id="earliestDatestamp"><head>The <ident>earliestDatestamp</ident> element</head>
<p>The <ident>oai:earliestDatestamp</ident> element ...</p>
</div>

<div id="deletedRecord"><head>The <ident>deletedRecord</ident> element</head>
<p>The <ident>oai:deletedRecord</ident> element ...</p>
</div>

<div id="granularity"><head>The <ident>granularity</ident> element</head>
<p>The <ident>oai:granularity</ident> element ...</p>
</div>

<div id="compression"><head>The <ident>compression</ident> element</head>
<p>The <ident>oai:compression</ident> element ...</p>
</div>

<div id="description"><head>The <ident>description</ident> element</head>
<p>The <ident>oai:description</ident> element ...</p>
</div>

<div id="ListIdentifiers"><head>The <ident>ListIdentifiers</ident> element</head>
<p>The <ident>oai:ListIdentifiers</ident> element ...</p>
</div>

<div id="header"><head>The <ident>header</ident> element</head>
<p>The <ident>oai:header</ident> element ...</p>
</div>

<div id="resumptionToken"><head>The <ident>resumptionToken</ident> element</head>
<p>The <ident>oai:resumptionToken</ident> element ...</p>
</div>

<div id="ListMetadataFormats"><head>The <ident>ListMetadataFormats</ident> element</head>
<p>The <ident>oai:ListMetadataFormats</ident> element ...</p>
</div>

<div id="metadataFormat"><head>The <ident>metadataFormat</ident> element</head>
<p>The <ident>oai:metadataFormat</ident> element ...</p>
</div>

<div id="ListRecords"><head>The <ident>ListRecords</ident> element</head>
<p>The <ident>oai:ListRecords</ident> element ...</p>
</div>

<div id="resumptionToken"><head>The <ident>resumptionToken</ident> element</head>
<p>The <ident>oai:resumptionToken</ident> element ...</p>
</div>

<div id="ListSets"><head>The <ident>ListSets</ident> element</head>
<p>The <ident>oai:ListSets</ident> element ...</p>
</div>

<div id="set"><head>The <ident>set</ident> element</head>
<p>The <ident>oai:set</ident> element ...</p>
</div>

<div id="header"><head>The <ident>header</ident> element</head>
<p>The <ident>oai:header</ident> element ...</p>
</div>

<div id="metadata"><head>The <ident>metadata</ident> element</head>
<p>The <ident>oai:metadata</ident> element ...</p>
</div>

<div id="about"><head>The <ident>about</ident> element</head>
<p>The <ident>oai:about</ident> element ...</p>
</div>

<div id="identifier"><head>The <ident>identifier</ident> element</head>
<p>The <ident>oai:identifier</ident> element ...</p>
</div>

<div id="datestamp"><head>The <ident>datestamp</ident> element</head>
<p>The <ident>oai:datestamp</ident> element ...</p>
</div>

<div id="setSpec"><head>The <ident>setSpec</ident> element</head>
<p>The <ident>oai:setSpec</ident> element ...</p>
</div>

<div id="metadataPrefix"><head>The <ident>metadataPrefix</ident> element</head>
<p>The <ident>oai:metadataPrefix</ident> element ...</p>
</div>

<div id="schema"><head>The <ident>schema</ident> element</head>
<p>The <ident>oai:schema</ident> element ...</p>
</div>

<div id="metadataNamespace"><head>The <ident>metadataNamespace</ident> element</head>
<p>The <ident>oai:metadataNamespace</ident> element ...</p>
</div>

<div id="setSpec"><head>The <ident>setSpec</ident> element</head>
<p>The <ident>oai:setSpec</ident> element ...</p>
</div>

<div id="setName"><head>The <ident>setName</ident> element</head>
<p>The <ident>oai:setName</ident> element ...</p>
</div>

<div id="setDescription"><head>The <ident>setDescription</ident> element</head>
<p>The <ident>oai:setDescription</ident> element ...</p>
</div>

*-->

<div>
<head>Remaining elements</head>
<p>The following element types have not yet been described in this
version of this document:<list type="bullets">
<item>GetRecord/record</item>
<item>Identify</item>
<item>Identify/*, i.e. <list type="bullets">
<item>baseURL</item>
<item>protocolVersion</item>
<item>adminEmail</item>
<item>earliestDatestamp</item>
<item>deletedRecord</item>
<item>granularity</item>
<item>compression</item>
<item>description</item>
</list>
</item>
<item>ListIdentifiers</item>
<item>ListIdentifiers/header</item>
<item>ListIdentifiers/resumptionToken</item>
<item>ListMetadataFormats</item>
<item>ListMetadataFormats/metadataFormat</item>
<item>ListRecords</item>
<item>ListRecords/record</item>
<item>ListRecords/resumptionToken</item>
<item>ListSets</item>
<item>ListSets/set</item>
<item>ListSets/resumptionToken</item>
<item>record/header</item>
<item>record/metadata</item>
<item>record/about</item>
<item>record/header/identifier</item>
<item>record/header/datestamp</item>
<item>record/header/setSpec</item>
<item>record/header/@status</item>
<item>metadataFormat/metadataPrefix</item>
<item>metadataFormat/schema</item>
<item>metadataFormat/metadataNamespace</item>
<item>set/setSpec</item>
<item>set/setName</item>
<item>set/setDescription</item>
</list>
</p>
</div>
</div>

<div id="types">
<head>Types</head>
<p>The interpretation rules given above assume that individuals can be
identified as belonging to particular types.  For our purposes, a type
can be regarded simply as a set of particular individuals, and an
individual <term>has</term>, or <term>is of</term>, a given type only
if that individual is a member of that set, and a notation like
<q>(&exists; <ident>i</ident> : <ident>t</ident>) &P;</q>
(<gloss>there exists an <ident>i</ident> of type
<ident>t</ident> such that &P;</gloss>) is merely a more concise way of writing
<q>(&exists; <ident>i</ident>)(<ident>i</ident> &in;
<ident>t</ident> &and; &P;)</q>, or (using the type name as a 
predicate true for members of the set and for no others)
<q>(&exists; <ident>i</ident>)(<ident>t</ident>(<ident>i</ident>)
&and; &P;)</q>.
</p>
<p>It follows that the types described here need not be disjoint,
although at the current stage of completion of this paper, they are in
fact all pairwise disjoint except for the <ident>object</ident> type,
which contains everything in the universe of discourse, and the
<ident>value</ident> type, which contains the union of the value
spaces of the simple XML Schema datatypes.</p>

<div>
<head>OAI-specific types</head>
<p>The types assumed by the OAI vocabulary are:<list type="bullets">

<item><ident>moment</ident>: an instant of time; in practice, moments
are identified by time stamps in the usual way.</item>

<item><ident>OAI-request</ident>: an HTTP <kw>GET</kw> request following
(or not following) the rules for OAI requests.<note place="foot">It
might be preferable to distinguish <ident>OAI-request</ident>
from <ident>request</ident>, where the former is guaranteed 
valid.</note></item>

<item><ident>OAI-response</ident>: an XML element with the generic
identifier <ident>OAI-PMH</ident> in the OAI 2.0 namespace
which obeys the rules laid down in <ptr type="bibref" target="oai-2.0"/></item>

<item><ident>OAI-server</ident>: an OAI repository.  As the OAI
specification says:
<q>A <term>repository</term> is a network accessible server that can 
process the 6 OAI-PMH requests in the manner described in</q> the
OAI 2.0 specification.  For our purposes, we treat repositories
as uniquely identified by their URI (the base URI of an OAI request
sent to that server); this should be non-controversial.  It is
less plausible to treat, as we do here, distinct URIs as identifying
distinct servers.  But there is no way, within an OAI message, to
make any claims about whether two OAI servers are or are not the
same.<note place="foot">Is this true?</note></item>

<item><ident>OAI-harvester</ident>: a consumer of OAI data.  Within a
given request/response interaction, typically the client of an OAI
server.  It is clear (e.g. from the discussion of provenance
statements in section 2.5 of <ptr target="oai-2.0" type="bibref"/>)
that the same institution may run both a server (repository) and a
harvester, possibly in the same executable.  For purposes of this
paper, however, the reader can assume that within any given
transaction (at least) the server and the client are different pieces
of software.
</item>

</list>
</p>
<note place="block">This list is incomplete; the plan is to add to
it gradually as the skeleton sentences require more entries.</note>
</div>
<div>
<head>Other types</head>
<p>In addition, there are a few types we need to define our expression
language, or to define signatures of relations:<list type="bullets">

<item><ident>attribute</ident>: an attribute of an XML element; 
typically denoted by an XPath expression.</item>
<item><ident>element</ident>: an XML element; typically denoted
by an XPath expression.</item>
<item><ident>expandedName</ident>: a pair consisting of a URI
and an XML <ident>NCName</ident>; what a qualified name (<ident>QName</ident>)
expands to in context (<ptr target="xmlns1.0" type="bibref"/>, 
<ptr target="xmlns1.1" type="bibref"/>).</item>
<item><ident>object</ident>: any kind of thing at all.</item>
<item><ident>xsd:string</ident>: a string of characters (here, in practice,
invariably a string of Unicode characters).</item>
<item><ident>value</ident>: a member of the value space of some
XML Schema datatype.</item>

</list>
</p>
</div>
</div>

<div id="rels">
<head>Predicates and relations</head>
<div id="primrels">
<head>Primitive relations</head>
<p>The rules of interpretation given in section <ptr target="ltsd"
type="secnum"/> appeal to a number of primitive relations.  It is
hoped that the nature of the relations has been clear enough from
context to allow the reader to follow the rules of interpretation; the
following list gives a natural-language description of each relation.
</p>
<div>
<head>OAI-specific relations</head>
<p>As with the set of types, the most interesting relations are
perhaps those specific to the OAI vocabulary:
<list type="bullets">

<item><ident>error_nldesc</ident> (<ident>OAI-request</ident> &times; <ident>xsd:string</ident>):
holds when the string is a sequence of characters which 
constitute a written form of a natural-language description of an error
in the OAI request.</item>

<item><ident>hasformat_repository_item_format</ident> (<ident>OAI-server</ident> &times; <ident>OAI-item</ident> &times; <ident>xsd:string</ident>):
holds when the item named has, in the repository named, a metadata
record in the format identified by the string (which is the label
associated with that format).
</item>

<item><ident>invalid</ident> (<ident>OAI-request</ident>):
true when the OAI request is invalid, false when it is 
valid.</item>

<item><ident>item_id</ident> (<ident>OAI-item</ident> &times; <ident>xsd:string</ident>):
holds when the string is the item identifier of the OAI item.
</item>

<item><ident>isin_repository_item</ident> (<ident>OAI-server</ident> &times; <ident>OAI-item</ident>):
holds when the item named is in the repository identified.<note place="foot">The
treatment of deleted records needs to be reviewed, to make sure the 
interpretations given here deal correctly with records deleted from 
the repository.</note>
</item>

<item><ident>req_resp</ident> (<ident>OAI-request</ident> &times; <ident>OAI-response</ident>):
holds when the OAI response is the response sent by an OAI server to
the OAI request.  The inverse is a function: any given response corresponds
to only one request.</item>

<item><ident>request_error</ident> (<ident>OAI-request</ident> &times; <ident>xsd:string</ident>):
holds when the string is the error code for an error
in the OAI request.</item>

<item><ident>request_from</ident> (<ident>OAI-request</ident> &times; <ident>xsd:string</ident>):
holds when the string is the identifier of the record at the beginning
of the range requested by the OAI request (or, equivalently, when the string is the
property of the request's <ident>from</ident> parameter).
A function.</item>

<item><ident>request_identifier</ident> (<ident>OAI-request</ident> &times; <ident>xsd:string</ident>):
holds when the string is the identifier of the record requested
by the OAI request (or, equivalently, when the string is the
property of the request's <ident>identifier</ident> parameter).
A function.</item>

<item><ident>request_metadataPrefix</ident> (<ident>OAI-request</ident> &times; <ident>xsd:string</ident>):
holds when the string is the metadata prefix for the metadata format requested
by the OAI request (or, equivalently, when the string is the
property of the request's <ident>metadataPrefix</ident> parameter).
A function.</item>

<item><ident>request_resumptionToken</ident> (<ident>OAI-request</ident> &times; <ident>xsd:string</ident>):
holds when the string is the resumption token passed by the
OAI request to the server
(or, equivalently, when the string is the
property of the request's <ident>resumptionToken</ident> parameter).
A function.</item>

<item><ident>request_set</ident> (<ident>OAI-request</ident> &times; <ident>xsd:string</ident>):
holds when the string is the identifier of the set
from which the identifier or records requested by the OAI request 
are to be drawn
(or, equivalently, when the string is the
property of the request's <ident>set</ident> parameter).
A function.</item>

<item><ident>request_until</ident> (<ident>OAI-request</ident> &times; <ident>xsd:string</ident>):
holds when the string is the identifier of the record at the end
of the range requested by the OAI request (or, equivalently, when the string is the
property of the request's <ident>until</ident> parameter).
A function.</item>

<item><ident>request_verb</ident> (<ident>OAI-request</ident> &times; <ident>xsd:NMTOKEN</ident>):
holds when the NMTOKEN is the verb of the OAI request.
(Informally, is known only when the OAI-request is valid.)
A function.</item>

<item><ident>resp_server</ident> (<ident>OAI-response</ident> &times; <ident>OAI-server</ident>):
holds when the OAI response was sent by the OAI server.
A function.<note place="foot">This (and some others) may be derivable.</note></item>

<item><ident>served_response</ident> (<ident>OAI-request</ident> 
&times; <ident>OAI-server</ident>
&times; <ident>moment</ident>
&times; <ident>OAI-response</ident>):
holds if and only if at the specified moment the specified OAI server
sent the specified OAI response as an answer to the specified OAI request.</item>

<item><ident>uri_server</ident> (<ident>xsd:string</ident> &times; <ident>OAI-server</ident>):
holds when the string is the URI of the server, i.e. the base URI of
queries addressed to the server.  A 1:1 relation.</item>

<!--* derivable, belongs below, not here 
<item><ident>was_sent_at</ident> (<ident>OAI-response</ident> &times; <ident>moment</ident>):
holds when the OAI response was sent at the moment indicated.
A function.</item>
*-->

</list>
</p>
<note place="block">This list is incomplete; the plan is to add to
it gradually as the skeleton sentences require more entries.</note>
</div>
<div>
<head>Other relations</head>
<p>Other relations appealed to are more general in nature:
<list type="bullets">

<!--* 
<item><ident>is</ident> (<ident>object</ident> &times; <ident>object</ident>):
holds when the same object is named (possibly using different names)
in both argument positions.  Used when <q>=</q> is awkward.</item>
*-->

<item><ident>models</ident> (<ident>element</ident> &times; <ident>object</ident>):
holds when the XML element string is a representation of the object
(or, equivalently, when the object is described by the element).
A function.</item>

<item><ident>xsd_lv</ident> (<ident>expandedName</ident> 
&times; <ident>xsd:string</ident> &times; <ident>value</ident>):
holds when (a) the expanded name denotes a simple type in the XML Schema
type system (in practice, here, always one of the primitive types);
(b) the string is in the lexical space of that type;
(c) the value is in the value space of that type; and
(d) in the lexical mapping appropriate to the type, the string
maps to the value.</item>

</list>
</p>
</div>
</div>
<div id="derrels">
<head>Derivable relations</head>
<p>Some relations used in the rules of interpretation are implied by 
others.  These are:<list type="bullets">

<item><ident>errorfree</ident> (<ident>OAI-request</ident>):
holds when the request has no errors; the complement of 
<ident>invalid</ident>.  Definable as:<q rend="display">
(&forall; &q; : OAI-request)(errorfree(&q;) &iff; &not;invalid(&q;))</q>
</item>

<item><ident>was_sent_at</ident> 
(<ident>OAI-response</ident> &times; <ident>moment</ident>):
The OAI-response was sent at the specified moment.
Derivable:<q rend="display">(&forall; &q; : OAI-request)
(&forall; &s; : OAI-server)
(&forall; &t; : moment)
(&forall; &r; : OAI-response)
(served_response(&q;,&s;,&t;,&r;) &implies;
was_sent_at(&r;,&t;))</q>
</item>
</list>
</p>
</div>
</div>

<div id="notn">
<head>Notation</head>
<p>The notation used here is what the author believes to be a fairly 
conventional form of first-order predicate calculus.  Since
notation for logic varies so greatly, however, it may be worth
describing the notation for individuals and sentences here,
both in prose and in standard Backus/Naur Form (BNF).  A couple of
BNF rules should probably be given in advance.  The non-terminal
symbol <ident>empty</ident> denotes the empty string.
<list type="simple">
<item>&lab;empty&rab; ::= </item>
</list>
And
<ident>digit</ident> and <ident>digits</ident> have the obvious
meaning.
<list type="simple">
<item>&lab;digit&rab; ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9</item>
<item>&lab;digits&rab; ::= &lab;digit&rab; | &lab;digits&rab; &lab;digit&rab;</item>
</list>
The symbols <ident>name</ident> and <ident>XPath expression</ident>
are used as terminal symbols assumed and not analysed by the grammar here.
Names match the <ident>NCName</ident> production in XML Namespaces 1.1
<ptr type="bibref" target="xmlns1.1"/>;
The XPath expressions used here are all legal both in XPath 1.0 and
in XPath 2.0 (<ptr target="xpath1.0" type="bibref"/>, 
<ptr target="xpath2.0" type="bibref"/>).
</p>
<p>An individual may be denoted by<list type="ordered">
<item>a name:
<list type="simple">
<item>&lab;individual name&rab; ::= &lab;name&rab;</item>
<item>&lab;individual reference&rab; ::= &lab;individual name&rab;</item>
</list>
</item>
<item>a variable reference (shown here as an <ident>NCName</ident>
in italics)
<list type="simple">
<item>&lab;variable reference&rab; ::= &lab;name&rab; /* in italics */</item>
<item>&lab;individual reference&rab; ::= &lab;variable reference&rab;</item>
</list></item>
<item>an XPath expression enclosed in braces (used only if
the individual is an XML element, an attribute, a string,
or an <ident>xsd:double</ident> floating-point number)
<list type="simple">
<item></item>
<item>&lab;individual reference&rab; ::= 
 { &lab;XPath expression&rab; } </item>
</list>
The values of such XPath expressions typically depend on
the XPath context node; in the absence of context information,
they do not denote individuals.  XPath expressions
accordingly appear only in skeleton sentences (sentence
schemata), not in fully ground sentences.   When ground
sentences are generated from schemata, the XPath expressions
are evaluated and the expressions are replaced by other
expressions denoting the individual values.
</item>
<item>an XPointer tumbler expression i.e. a string matching
the regular expression <q><code>(/[0-9]+)+</code></q>, surrounded
by parentheses and preceded by the keyword <kw>element</kw>,
e.g. <code>element(/1/2/2/8/3/1/3)</code>.
<list type="simple">
<item>&lab;numeric path&rab; ::= / &lab;digits&rab; 
  | &lab;numeric path&rab; / &lab;digits&rab;</item>
<item>&lab;XPointer tumbler&rab; ::= element ( &lab;numeric path&rab; )</item>
<item>&lab;individual reference&rab; ::= &lab;XPointer tumbler&rab;</item>
</list>
Tumbler expressions denote individual XML elements (the identity of
the document containing the element is assumed to be known) following
the rules given in the XPointer specification.  The
sample tumbler expression given denotes, for example (or did denote,
at one point in the drafting of this paper) this list item in the XML
source of this document.
Tumbler expressions are used used only if the individual is an XML
element, and will typically appear in ground sentences, as the
replacement for an XPath expression denoting an XML element.</item>

<item>an expression of the form 
<q>(&descrip; &x; : &T;)(&P;)</q> or
<q>(&descrip; &x;)(&P;)</q> 
where &P; is a sentence, &x; is
a variable, and &T; is the name of a type.
<list type="simple">
<item>&lab;type name&rab; ::= &lab;name&rab;</item>
<item>&lab;optional type&rab; ::= &lab;empty&rab;
 | : &lab;type name&rab;</item>
<item>&lab;definite description&rab; ::= ( &descrip; &lab;variable reference&rab;
  &lab;optional type&rab; ) &lab;sentence&rab;</item>
<item>&lab;individual reference&rab; ::=  &lab;definite description&rab;</item>
</list>
Informally, this means <q>The unique &x; of type &T; such that &P; is
true</q>.  Any free occurrences of &x; in &P; are bound in the
resulting definite description by the <q>(&descrip; &x;)</q>, and
definite descriptions are normally used only if &x; does occur unbound
in &P;; otherwise they don't make much sense.
</item>
</list>
</p>
<!--* <p>In the extended Backus-Naur form used in the XML 1.0 specification,
<list type="simple">
<item>individual_reference ::= Name | Variable_reference
  | "<code>{</code>" XPath_expression "<code>}</code>" | XPointer_tumbler
  | definite description
</item>
<item>
XPointer_tumbler ::= "<code>element(</code>" numeric_path "<code>)</code>"
</item>
<item>
numeric_path ::= ("<code>/</code>" digits)+
</item>
<item>
definite_description ::= "<code>(&descrip;</code>" variable_reference 
  optional_type "<code>)</code>" sentence
</item>
<item>
digits ::= [0-9]+
</item>
</list>
</p> *-->
<p>Sentences can be combined in the usual ways with Boolean
connectors, and prefixed with variable quantifiers.  The biconditional
(&iff;) has wider scope than the conditional (&implies;), which in
turn has wider scope than conjuction and disjunction.  Quantification
and negation have the narrowest scopes of all.  The symbols
<ident>sentence0</ident>, <ident>sentence1</ident>, etc. enforce
this precedence order formally, but the prose descriptions ignore 
these technicalities.
<list type="ordered">
<item>A predicate expression, that is a
relation name followed by a parenthesized list of comma-separated 
arguments, is a sentence. Each argument must be 
<!--* an identifier, a variable. *-->
a term denoting an individual.
<list type="simple">
<item>&lab;relation name&rab; ::= &lab;name&rab;</item>
<item>&lab;argument&rab; ::= &lab;individual reference&rab;</item>
<item>&lab;argument list&rab; ::= &lab;argument&rab; 
  | &lab;argument list&rab; , &lab;argument&rab;</item>
<item>&lab;predicate expression&rab; ::= &lab;relation name&rab; ( &lab;argument list&rab; )</item>
<item>&lab;sentence0&rab; ::= &lab;predicate expression&rab;</item>
</list>
</item>
<item>A sentence enclosed in parentheses is a sentence.
<list type="simple">
<item>&lab;sentence0&rab; ::= ( &lab;sentence&rab; )</item>
</list></item>
<item>If &P; is a sentence, then 
<q>&not; &P;</q> is a sentence.
<list type="simple">
<item>&lab;sentence1&rab; ::= &lab;sentence0&rab;
 | &not; &lab;sentence0&rab;</item>
</list>
The operator <q>&not;</q> denotes negation.  
</item>

<item>If &P; is a sentence, and &x; is
a variable, and &T; is the name of a type, then 
<q>(&exists; &x;)&P;</q> is a sentence, and so is
<q>(&exists; &x; : &T;)&P;</q>.
<list type="simple">
<item>&lab;sentence2&rab; ::= &lab;sentence1&rab;
| (&exists; &lab;variable reference&rab; &lab;optional type&rab; ) &lab;sentence2&rab;
</item>
</list>
The construction
<q>(&exists; &x;)&P;</q> means <gloss>There exists an &x; such that &P;</gloss>, and
<q>(&exists; &x; : &T;)&P;</q> means <gloss>There exists an &x; of type &T; 
such that &P;</gloss>.
The construct <q>&exists; &x;</q> (for any variable &x;) is the existential quantifier; 
it binds any free occurrences of &x; in &P;.  (Formally, there need not be any
free occurrences of &x; in &P;, but it is usual.)
</item>

<item>If &P; is a sentence, and &x; is
a variable, and &T; is the name of a type, then 
<q>(&forall; &x;)&P;</q> is a sentence, and so is
and <q>(&forall; &x; : &T;)&P;</q>.
<list type="simple">
<item>&lab;sentence2&rab; ::= &lab;sentence1&rab;
| (&forall; &lab;variable reference&rab; &lab;optional type&rab; ) &lab;sentence2&rab;
</item>
</list>
The construction <q>(&forall; &x;)&P;</q> means <gloss>For all &x;, it
is the case that &P;</gloss>, and <q>(&forall; &x; : &T;)&P;</q> means
<gloss>For all &x; of type &T;, it is the case that &P;</gloss>.  The
construct <q>&forall; &x;</q> (for any variable &x;) is the universal
quantifier; it binds any free occurrences of &x; in &P;.  (Formally,
there need not be any, but it is usual.)
</item>

<item>If &P; and &Q; are sentences, then 
<q>&P; &and; &Q;</q> is a sentence.
<list type="simple">
<item>&lab;sentence3&rab; ::= &lab;sentence2&rab;
 | &lab;sentence3&rab; &and; &lab;sentence2&rab;
</item>
</list>
The connector <q>&and;</q> denotes conjunction.</item>

<item>If &P; and &Q; are sentences, then 
<q>&P; &or; &Q;</q> is a sentence.
<list type="simple">
<item>&lab;sentence3&rab; ::= &lab;sentence2&rab;
 | &lab;sentence3&rab; &or; &lab;sentence2&rab;
</item>
</list>
The connector <q>&or;</q> denotes disjunction.  Note that
<q>&and;</q> and <q>&or;</q> have the same precedence and are
left-associative, so a sentence like <q>&P; &and; &Q; &or; &R;</q> is
interpreted as <q>(&P; &and; &Q;) &or; &R;</q>.  In practice,
I'll usually parenthesize explicitly to reduce confusion.</item>

<item>If &P; and &Q; are sentences, then 
<q>&P; &implies; &Q;</q> is a sentence.
<list type="simple">
<item>&lab;sentence4&rab; ::= &lab;sentence3&rab;
 | &lab;sentence3&rab; &implies; &lab;sentence3&rab;
</item>
</list>
The connector <q>&implies;</q> denotes material implication
(<q>&P; &implies; &Q;</q> = <gloss>&P; only if &Q;</gloss>).</item>

<item>If &P; and &Q; are sentences, then 
<q>&P; &iff; &Q;</q> is a sentence.
<list type="simple">
<item>&lab;sentence&rab; ::= &lab;sentence4&rab;
 | &lab;sentence4&rab; &iff; &lab;sentence3&rab;
</item>
</list>
The connector <q>&iff;</q> denotes the biconditional (<gloss>if and
only if</gloss>).</item>
</list></p>
</div>

</body>
<back>
<div>
<head>References</head>
<listBibl>

<bibl id="niml" n="Hughes/Cresswell 1996">
<author>Hughes, G. E.</author>, and
<author>M. J. Cresswell</author>.
1996.
<title level="m">A new introduction to modal logic</title>.
London, New York: Routledge.
</bibl>

<bibl id="oai-2.0" n="Lagoze et al. 2002">
<editor>Lagoze, Carl</editor>,
<editor>Herbert Van de Sompel</editor>,
<editor>Michael Nelson</editor>, and
<editor>Simeon Warner</editor>, ed.
<date>2002</date>.
<title level="m">The Open Archives Initiative 
Protocol for Metadata Harvesting</title>.
Protocol Version 2.0 of 2002-06-14.
Document Version 2004/10/12T15:31:00Z.
[n.p.]: Open Archives Initiative, 2002.
<xref>http://www.openarchives.org/OAI/2.0/openarchivesprotocol.htm</xref>
</bibl>

<bibl id="quine.ml" n="Quine 1951">
<author>Quine, Willard Van Orman</author>.
1951.
<title level="m">Mathematical logic</title>.
Revised edition.
Cambridge, Mass.: Harvard University Press.
</bibl>

<bibl id="quine.methods" n="Quine 1982">
<author>Quine, W. V.</author>
1982.
<title level="m">Methods of logic</title>.
Cambridge, Mass.: Harvard University Press.
</bibl>

<bibl id="hrsm" n="Sperberg-McQueen/Huitfeldt/Renear 2001">
Sperberg-McQueen, C. M., Claus Huitfeldt, and Allen Renear.
<title level="a">Meaning and interpretation of markup.</title>
<title level="j">Markup Languages: Theory &amp; Practice</title>
2.3 (2001): 215&ndash;234.
<xref>http://www.w3.org/People/cmsmcq/2000/mim.html</xref>
</bibl>

<bibl id="xmlns1.0" n="W3C 1999a">
World Wide Web Consortium (W3C).
1999a.
<title level="m">Namespaces in XML</title>,
ed. Tim Bray, Dave Hollander, and Andrew Layman.
[Cambridge, MA; Sophia-Antipolis; Tokyo]: World Wide
Web Consortium, 14 January 1999.
<xref>http://www.w3.org/TR/REC-xml-names</xref>
</bibl>

<bibl id="xpath1.0" n="W3C 1999b">
World Wide Web Consortium (W3C).
1999b.
<title level="m">XML Path Language (XPath)
Version 1.0</title>,
ed. James Clark and Steve DeRose.
W3C Recommendation 16 November 1999.
[Cambridge, MA; Sophia-Antipolis; Tokyo]: World Wide
Web Consortium, 1999.
<xref>http://www.w3.org/TR/xpath</xref>
</bibl>

<bibl id="xmlns1.1" n="W3C 2004">
World Wide Web Consortium (W3C).
2004.
<title level="m">Namespaces in XML 1.1</title>,
ed. Tim Bray, Dave Hollander, Andrew Layman, 
and (version 1.1) Richard Tobin.
W3C Recommendation 4 February 2004.
[Cambridge, MA; Sophia-Antipolis; Tokyo]: World Wide
Web Consortium, 2004.
<xref>http://www.w3.org/TR/xml-names11</xref>
</bibl>

<bibl id="xpath2.0" n="W3C 2005">
World Wide Web Consortium (W3C).
2005.
<title level="m">XML Path Language (XPath)
2.0</title>,
ed. Don Chamberline et al.
W3C Candidate Recommendation 3 November 2005.
[Cambridge, MA; Sophia-Antipolis; Tokyo]: World Wide
Web Consortium, 2005.
<xref>http://www.w3.org/TR/xpath20</xref>
</bibl> 


</listBibl>
</div>
</back>
</text>
</TEI.2>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
sgml-default-dtd-file:"/SGML/Public/Emacs/teilite.ced"
sgml-omittag:t
sgml-shorttag:t
End:
-->

