Customizing the Z39.50 Connector

Customizing the Z39.50 Connector

You can customize your Z39.50 implementation to meet the needs of your users in two different ways. To customize which metadata elements are available to Z39.50 clients for searching, modify the default definition file, GEO_expanded.xml. To customize the responses that are returned, modify the stylesheets used to format the responses.

Defining the information available for searching

The ArcIMS Z39.50 Connector supports the GEO Profile of the Z39.50 standard; created by the FGDC, it lets you define geospatially relevant search criteria and, therefore, find GIS resources using the Z39.50 protocol.

Z39.50 clients specify the type of information for which they want to search by providing a list of numeric use attribute codes. For example, with the BIB-1 profile, which is used by libraries, the code “4” indicates that the user is looking for a word in the resource’s title. The GEO Profile is built on two existing profiles: BIB-1 and Government Information Locator Service (GILS). This means that in the GEO Profile, “4” is also associated with the title; the code “2060” is only used by the GEO Profile—it indicates the user is doing a spatial search against the bounding coordinates that are defined in the metadata of the resource.

The codes used by a profile and the meaning of those codes are registered with the Z39.50 Maintenance Agency. This means clients and servers agree on what the user is searching for. However, the profile doesn’t specify how the server must implement the search against its database because each database is likely to have a different structure.

The ArcIMS Z39.50 Connector uses a file, GEO_expanded.xml, that maps the use attribute codes into one or more XPaths that identify the location in the published metadata documents where the information can be found. Since ArcCatalog provides both FGDC and ISO metadata editors, this file provides XPaths that locate the same information in both formats.

The screen below shows attribute codes to metadata elements used by GEO_expanded.xml maps GEO Profile’s; this defines what information in the published documents can be searched.

Mapping metadata elements to the GEO profile

Profiles also define some of their codes as mandatory; any client or server that supports a profile must, at a minimum, recognize and support the mandatory codes. All the mandatory GEO Profile codes and several additional codes are supported in the GEO_expanded.xml file, including 1012–Metadata Date, 2017–Ordering Instructions, 2021–Online Linkage, and 2042–Place Keyword.

By modifying the GEO_expanded.xml file, you can customize what content in your published documents is available for searching. For example, to support another use attribute code, add it to the file along with the appropriate mapping. Or, to make a custom metadata element available for searching, map your XPath to an existing use attribute code. Follow the structure used in the GEO_expanded.xml file.

Defining how the Z39.50 response is produced

In this example, the GEO_expanded.xml file is modified to include searching an ESRI-defined metadata element to determine when a metadata document was last modified.

Generating the Z39.50 response

When a Z39.50 client sends a request to a Z39.50 server, one of the parameters in the request defines how the response must be formatted; in Z39.50 terms, this is the response syntax. The ArcIMS Z39.50 Connector supports the return of records in the formats XML, HTML, Simple Unstructured Text Record Syntax (SUTRS), and Machine-Readable Cataloging (USMARC). SUTRS is essentially plain text. USMARC is the format typically used by libraries.

Another parameter in the request defines the amount of information that should be returned for each document that was found; in Z39.50 terms, this is the element set. The Z39.50 Connector supports the return of records at the full, brief, and summary levels.

The connector uses Extensible stylesheet language transformation (XSLT) stylesheets to convert the response produced by the Metadata Service to a Z39.50 response. The transformations.xml file matches each format and information level combination to a stylesheet that is used to generate the proper response; there are 12 combinations in all. When the connector is set to log messages at the DEBUG level, you can see the output generated by these stylesheets in the debug log file.

You can customize the response that is generated by the connector by modifying the stylesheets that are provided with ArcIMS. Or you can modify the transformations.xml file to use your own stylesheets instead. If you prefer to provide a different file that maps the Z39.50 client syntax and element set combinations to your own stylesheets, change the transformationMap property in the properties file.

The transformations.xml file defines which XSLT stylesheets are used to produce the appropriate Z39.50 response, as shown below.

Transforming the Metadata Service response to Z39.50

Controlling the format of responses

A Z39.50 client request specifies the format in which documents must be returned and the amount of information that should be included for each document. The format, or syntax, options are XML, SUTRS, USMARC, or HTML. The options for the amount of information, the element set, are full, brief, or summary. These options are discussed in the previous section, ‘Customizing the connector’.

Converting the Metadata Service’s response to the requested Z39.50 response format is a two-step process. First, the Z39.50 Connector determines which stylesheet to use, then the appropriate stylesheet is applied to produce the required output. The transformations.xml file determines which stylesheet is used; it maps all supported Z39.50 client syntax and element set combinations to one of the 12 XSLT stylesheets provided with the connector. To customize the connector to use a different mapping file, change the transformationMap property in the Z3950.properties file.

  1. Edit the Z3950.properties file in a text editor. This file is located in the Z39.50 Connector’s install directory.

  2. Set the transformationMapFile property to the name of the mapping file. The mapping file must be located in the Z39.50 Connector’s install directory.
    As shown in the file below: transformationMapFile=transformations.xml
    Controlling the format of responses

  3. Save and close the file.

  4. Stop and restart the ArcIMS Z3950 service in the Services window.

 



Search code: @customizing_the_z3950_connector