# Presentation: 125892

## Z39.50 URL

- Implementation and Use
- University of Kansas Natural History Museum & Biodiversity Research Center
- ZIG / LoC / December 2000

## URL’s as Subset Identifiers

- Z39.50 Universe

- Z3950://

- =Operation (search, scan) + Query

## LDAP URL

**ldapurl = scheme "://" [hostport] ["/" [dn ****	****   ["?" [attributes] ["?" [scope] ["?" ****	****   [filter] ["?" extensions]]]]]] scheme = "ldap" ****attributes = attrdesc *("," attrdesc) ****scope = "base" / "one" / "sub" ****dn = distinguishedName****hostport = hostport****attrdesc = AttributeDescription****filter = filter****extensions = extension *("," extension) ****extension = ["!"] extype ["=" exvalue] ****extype = token / xtoken ****exvalue = LDAPString****token = oid****xtoken = ("X-" / "x-") token **

## LDAP URL Example

- LDAP URL referring to the set of entries found by querying the LDAP server on port 6666 with a subtree search of the University of Michigan for any entry with a common name of "Babs Jensen", retrieving all attributes:
**ldap://host.com:6666/o=University%20of%20Michigan, c=US??sub?(cn=Babs%20Jensen) **

**ldap://host.com:6666/o=University of ****Michigan,c=US??sub?(cn=Babs Jensen)**

## Z39.50 URL

**z39.50url = "z3950://" [username ":" password "@"]               host [":" port] ["/" [database] ["search?query=(" pqn ")"]| ["scan?query=(" pqn ")"]] ["&esn=" elementset] ["&rs=" recordsyntax] ["&encode=" encodehtml] ["&maxrecs=" max] ["&ss=" URL]**
** **
**	****username     = uchar**
**	****password     = uchar**
**	****host         = TCP/IP host name**
**	****port         = TCP/IP port number**
**	****database     = uchar**
**	****pqn          = uchar**
**	****elementset   = "B"|"F"|"G"|"S"|uchar**
**	****recordsyntax = "GRS-1"|"SUTRS"|"USMARC"|uchar**
**	****encodehtml   = "1"|"0"**
**	****max          = integer**
**	****URL          = TCP/IP URL**

## Standard Content Structure

- XML- easily manipulated content
- No restrictions on content structure
- Many free and commercial tools

**<?xml version="1.0"?>**
**<response>**
**	****<header>**
**	****	****<target protocol="z3950" URI="z3950://..." ****	****	****	****	****	****	**** database="adatabase">**
**	****	****</target>**
**	****	****<query operation="Operation Term">Query string</query>**
**	****	****<timestamp>07122000 084500Z****	****</timestamp>**
**	****	****<maxrecords count="MaxRecsRequested" />**
**	****	****<hits count="NumberOfHits" />**
**	****</header>**
**	****<errors><error>Error Text</error></errors>**
**	****<records>**
**	****	****<record>Record Contents</record>**
**	****</records>**
**</response>**

## Implementation

- Native Z39.50 protocol support in Internet Explorer

## Architecture

- Z39.50 Client

- DatabaseAPI (OLEDB)

- Z39.50 Server

- Information Retrieval Logic

- Metadata and Data

- Desktop or B2B Application

- Specific to Win32

- Server System

- Information Retrieval Logic

**Notes:**
Win32 software architecture for accessing resources

## The 5 Minute Z39.50 Client

**<HTML>**
**<BODY>**
**<script language="javascript">**
**function doQuery()**
**{**
**	****var sQry = "(@attr 1=1 \"" + term.value +"\")";**
**	****var sURL="z3950://" + server.value;**
**	****sURL += "/kubirds/search?query="+sQry;**
**	****window.navigate(sURL);**
**}**
**</script>**
**<INPUT id="server" type="text" value="localhost" /><br />**
**<INPUT id="term" type="text" value="otus asio%" />**
**<INPUT type="Submit" value="Search" onClick="doQuery();" />**
**</HTML>**

## Conclusions

- Z39.50 URL combined with XML provides extremely flexible IR solution
- Use of common result set structure facilitates interoperability between alternate protocols (http, ldap, SQL,...)
- Benefit of Z39.50 to biological community has been the concept of “registered” attribute sets and schemas

## Z39.50 URL Examples

- NH Records with scientific name “falco peregrinus”
- z3950://server.ip.address:port/database/search?query=(@attr 1=1 “falco p%”)
- _[z3950://129.237.201.230:210/](z3950://129.237.201.230:210/kubirds/search?query=(@attr%201=1%20%22falco%20p%25%22))__[kubirds](z3950://129.237.201.230:210/kubirds/search?query=(@attr%201=1%20%22falco%20p%25%22))__[/search?query=(@](z3950://129.237.201.230:210/kubirds/search?query=(@attr%201=1%20%22falco%20p%25%22))__[attr](z3950://129.237.201.230:210/kubirds/search?query=(@attr%201=1%20%22falco%20p%25%22))__[ 1=1 “](z3950://129.237.201.230:210/kubirds/search?query=(@attr%201=1%20%22falco%20p%25%22))__[falco](z3950://129.237.201.230:210/kubirds/search?query=(@attr%201=1%20%22falco%20p%25%22))__[ p%”)](z3950://129.237.201.230:210/kubirds/search?query=(@attr%201=1%20%22falco%20p%25%22))_
- Search for all GILS records with “water” in the title
- Z3950://server:port/database/search?...