- From: Alan Kent <ajk@mds.rmit.edu.au>
- Date: Wed, 8 Nov 2000 20:29:06 +1100 (EST)
- To: www-zig@w3.org
Hi all. This message has commercial connotations, but refers to some free software including a Z39.50 API so I thought it might be of interest to the list. As a part of our latest product release (SIM), we have now made our Z39.50 API available with a proprietory scripting language (Ace). The API is really a SIM API, but its mainly Z39.50 with a few SIM specific extensions. It can certainly be used to talk to non-SIM Z39.50 servers. Ace has MARC and XML support built in as libraries. I am not posting this because its anything earth shattering, but I thought some people might find it fun to play with. I am certainly not putting the API forward as a "standard" Z39.50 API. It is designed primarily to work with our own product. It does however make it fairly easy to write little Z39.50 applications to try things out. For example, the following Ace script performs an RPN query on an Explain database. You can also turn on debug flags to watch the exact Z39.50 packets fly backwards and fowards. # # Send of a constructed rpn query which queries the explain database. # import ZApi; begin # Make sure the user enters the correct number of arguments. if argv.size() <> 4 then return "Usage: rpnquery.ace <host:port> <username> <password>\n"; end; # Connect to the server. ZAssociation c(argv[1]); # Log on with the given username and password. ZInit init := c.init(ZOptions(), ZImpl(), ZAuthId(argv[2], argv[3])); # Check initialization succeeded. if not init.success then return "Initialization to " + argv[1] + " did not succeed.\n"; end; # Explain needs to be supported for database information to be attained. if not c.explainSupported() then return argv[1] + " does not support explain.\n"; end; # Construct the rpn query. ZRpn rpn := ZRpnTerm([1, 1, 2, 3], "CategoryList"); ZQuery query := ZQueryRpn(rpn, Oid("exp-1")); # Send of the query and display the number of matching records. ZSearch search := c.search("S1", ["IR-Explain-1"], query); return "The number of matching records was: " + search.numFound.toString(); end Its available for NT and Solaris. I hope someone finds it fun. Its available on our web site somewhere. Go to our home page http://www.simdb.com/ and enter "Ace download" as the query. The download page should be near the top of the search results. Let me know of any problems. Alan
Received on Wednesday, 8 November 2000 04:54:18 UTC