The Scheme Binding

28th January 2003

Scheme Binding Specification

The Scheme binding is maintained by Johannes Leveling <Johannes.Leveling@fernuni-hagen.de>

The specification for this binding is not yet available on-line; however, the API is described in the README file from the BZoom implementation distribution.

Canonical Sample Program

To give a flavour of the Scheme binding, here is ZOOM's equivalent of the ``Hello World'' program: a tiny Z39.50 client that fetches and displays the MARC record for Farlow & Brett Surman's The Complete Dinosaur from the Library of Congress.

(module hello_world
        (include "bzoom.sch")
        (include "bzoom.scm")
        (main main))

(define main (lambda (args)
               (let ((conn
                      (zoom:connection_new "z3950.loc.gov:7090/Voyager" 0)))
                 (zoom:connection_option_set 
                  conn "preferredRecordSyntax" "USMARC")
                 (let* ((r (zoom:connection_search_pqf 
                            conn "@attr 1=7 0253333490"))
                        (rec (zoom:record_get 
                              (zoom:resultset_record r 0)
                              "render")))
                   (if (pair? rec)
                       (display (car rec)))
                   0))) )

Scheme Binding Implementations

We currently have the following implementations of the Scheme binding:

Feedback to <mike@indexdata.com> is welcome!