SRU (Search/Retrieval Using URL)

SRU VERSION 1.1 ARCHIVE

SRU Explain Operation

Request Parameters -   Response ParametersExample

The Explain record serves to record facilities available at an SRU server. It is used by clients to self-configure. The record is in XML and follows the ZeeRex Schema (also used for describing Z39.50 servers) described in general at http://explain.z3950.org/. and specifically for SRU at http://explain.z3950.org/srw/.

There are two methods for getting the explain record.

  • Via the SRU Explain Operation. 

  • http GET request at the base URL for the service (no parameters). This can be considered an SRU request (and hence have a default recordPacking of 'xml'), with no extraRequestData and leaving it up to the server to determine the version of the response. Otherwise, the response is identical to an SRU explainResponse message.

Request Parameters

Parameter Name Mandatory or optional Description
version Mandatory

The SRU version.

recordPacking Optional

How the explain record should be escaped in the response, 'string' or 'xml'. The default is 'xml'.

stylesheet Optional

A URL for an xml stylesheet. The client requests that the server simply return this URL in the response.

extraRequestData Optional

Provides additional, profile specific information. See Extra Data.

operation Mandatory

The string: 'explain'.


Response Parameters

Name Type Mandatory or Optional Description
version xsd:string Mandatory

The SRU version of the response. Must be less than or equal to the version requested by the client.

records record mandatory

a single Explain record (as shown in the example below).

extraResponseData xmlFragment Optional

Additional, profile specific information See Extra Data.


SRU Explain Example

The following URLs all produce the explain document.

  • http://myserver.com/myurl/?operation=explain&version=1.1&stylesheet=http://myserver.com/myStyle
  • http://myserver.com/myurl/?
  • http://myserver.com/myurl/

The corresponding response from the server would be:

<?xml-stylesheet type="text/xsl" href="http://myserver.com/myStyle"?>
< srw:explainResponse xmlns:srw="http://www.loc.gov/zing/srw/"
   xmlns:zr="http://explain.z3950.org/dtd/2.0/">
      <srw:version>1.1</srw:version>
      <srw:record>
           <srw:recordPacking>XML</srw:recordPacking>  
           < srw:recordSchema>http://explain.z3950.org/dtd/2.0/ </srw:recordSchema>
           <srw:recordData>
               <zr:explain>
                   < zr:serverInfo wsdl="http://myserver.com/db" protocol="SRU" version="1.1">        
                        < host>myserver.com</host>
                        <port>80</port>
                        <database>sru</database>
            </zr:serverInfo>
           <zr:databaseInfo>
               <title lang="en" primary="true">SRU Test Database</title>
               < description lang="en" primary="true"> My server SRU Test Database </description>
        </zr:databaseInfo>
        <zr:metaInfo>
           < dateModified>27-11-2003</dateModified>
      < /zr:metaInfo>
      ...
    </zr:explain>
</srw:recordData>
</srw:explainResponse>