The input parameters that apply generally to the ZAP template are presented below.
The target to connect to. If you make repeated declarations of this, ZAP will submit the query to all of the targets. The value is either hostname[:port][/database+database+...], or a private, logical name. If you use a logical name, you must use host(x) ( see below) to define the actual host address.
The hostname, port, and database corresponding to the private logical name x. Example:
host(test)=www.indexdata.dk:210/gils |
The target is then set by:
target=test |
A display name corresponding to the private logical name x (useful for display to the user when multiple targets are searched concurrently. Example:
name(test)=Index Datas test server |
Can be set to search, scan or init where search is default. When set to init only an init request is sent to the server. When set to search the normal "Open connection, perform search, get records back, display records" operation is performed. When set to scan a Scan request is sent.
If this is set to 1, the gateway will dump the parameters on the HTML output. This option is useful for debugging your forms. Default is 0 (no debug information is displayed).
If this is set to 1, the connections to the server will be cached by each process (works only in the Apache module version). We recommend that you not enable this until you are happy with the way your setup works in general.
Turns piggybacking off, since default is on. Piggybacking is the consept of having records send back along with the search responce in order to save a network round trip. However some servers don't like this and may cause problems if it is turned on. Example:
piggyback=0 |
The time in seconds with no network activity before the search is abandoned for a given server. Default is 20 sec.
The content type of the document. If this is not set, text/html is sent. Example:
content-type=text/html |
The input parameters that apply specifically to the search are presented below.
The offset of first record to be retrieved. Offsets are numbered 1, 2, 3.. If start is unset, the value 1 is assumed.
The records retrieved from a target is thus
start, start+1, ... start+number-1
The number of records to retrieve. If the number of hits is less than start+number, ZAP will retrieve fewer records. If number is omitted, 10 is assumed (10 records retrieved).
The offset of first record to show - within records retrieved from the target. Setting this allows you to view a subset of the records retrieved from the target. Useful if ZAP is configured to sort records. First record shown is 0. next is 1, etc.
And the records shown is:
start+show_offset, start+show_offset+1, ... start+show_number-1.
Number of records to show in ZAP. See the Section called show_offset.
The preferred record syntax. If the target supports the syntax specified, records should be returned in this format. Currently supported values are: Ausmarc, Canmarc, Carmarc, CCF, Danmarc, Finmarc, GRS1, HTML, Ibermarc, Intermarc, ISDSmarc, JPmarc, Librismarc, MAB, Malmarc, Normarc, Picamarc, RUSmarc, SBN, SIGLEmarc, SOIF, SUTRS, SWEmarc, UKmarc, Unimarc, USmarc, XML
Apart from these OID can be used. See OID at the Z39.50 Maintenance Agency for more information.
If syntax is not set, ZAP does not specify preferred record syntax, so the target may decide type of record to be returned (if any).
The schema to ask for. Both strings and OID can be used. See OID list at the Z39.50 Maintenance Agency for more information. Example:
schema=holdings |
The element set name to ask for. Most targets supports element set B and F which stands for Brief and Full respectively.
A record syntax corresponding to the private logical server name x. Example:
syntax(test)=grs1 |
If a syntax is not specified explicitly for a given target, the syntax given by the unqualified parameter is used.
This parameter is used to turn piggyback off for a given target. Default is on (1). Example:
piggyback(test)=0 |
A search term. N should be a low integer, ie. term1. You may supply as many entries as you wish, but there must be no "gaps" - ie. you can't just supply a term1 and a term3. A term may have an empty string value, however, in which case it is ignored.
The search qualifications which should be applied to termN. The syntax is "@attr [attribute-set] type=value", where attribute-set is optional (default is Bib1), and type is the numeric attribute type, and value is the attribute value. The @attr expression may be repeated if multiple attributes are to be used. The contents of the variable may also be a symbolic name, defined by the map(y) variable below.
Please see Bib-1 attribute set page at the Z39.50 Maintenance Agency for further details on the Bib1 attribute set.
This introduces a mapping of a symbolic field name to a specific attribute combination. It can be used to simplify the parameter passing from the form, and also to aid in a more intuitive display of the query, if you use the query variable to give feedback to the user. Example:
map(Title)=@attr 1=4 |
If you put this in your def or override section of the ZAP template (see below), then you could use "Title" as a value for fieldN.
In order to map a specific attribute combination to a specific target the syntax map(y,x) is used. Example:
map(Title)=@attr 1=4 map(Title,test)=@attr 1=1 |
The above code will, when searching in the title field, search all targets with the attribute 1=4 except the "test" target that will be searched with 1=1.
The operator which connects termN and the first subsequent, non-empty term. The value should be one of "and", "or", or "not". If there is a termN and a termN+1, but there is no opN, then "and" is assumed.
Specifies which operators should be used if a term is left empty. Can be set to either left or right. Default is left. In the following example we have a query of the form "term1 op1 term2 op2 term3" where "term2" is an empty string. In that case the query is interpreted as:
op=left: term1 op1 term3 op=right: term1 op2 term3 |
This setting controls when/how ZAP collects results from multiple targets. These are the possible values and their meaning:
In this configuration, ZAP invokes the sections %%server-hits, %%records begin, and all record display sections as soon as each target has returned all records. This is the fastest way to produce results to the user, but it does not allow to display a merged result or even a total hit count (for all targets).
This mode is the default
Here, ZAP does not invoke sections %%server-hits, %%records begin, .. etc until all targets has completed operation. In this mode, a ZAP template may display total hits before each record is displayed.
In this mode, ZAP, will collect all results, then invoke sections %%server-hits, %%sort-record, %%sort-format for all targets. This mode makes ZAP to sort all records retrieved from the target. When sorting is complete %%records begin and other formatting sections are invoked as usual - but in sorted order.
The input parameters that apply only to scan are presented below.
The number of records to ask for when a scan is performed. (See the Section called action). Default is 10.
The position of the closest match in the scan result set. If scanposition=1 the closest match will be in the top of the list and if scannumber=10 and scanposition=10 it will be in the bottom of the list. Default is 5.
Depending on the target you should provide either authOpen (v2/v3 targets) or one or more of the three others (v3 targets only).
Open-authentication. This authentication scheme is a Z39.50 v2/v3 feature. Usually the string has the form user/password, e.g. "peter/secret". Example:
authOpen(localhost:9999/Default)=myname/mypassword |
Group ID for authentication. This is a Z39.50v3 feature.
User name authentication. This is a Z39.50v3 feature. Example:
authUserId(localhost:9999/Default)=myname |
Password for authentication. This is a Z39.50v3 feature. Example:
authPassword(localhost:9999/Default)=mypassword |