Chapter 8. CCL

Table of Contents
CCL Attributes
CCL Input Parameters

ZAP is also capable of performing CCL (Common Command Language) searching. CCL allows you to shorthand references to fieldnames such as e.g. "ti" for title and "au" for author. The shorthand names are called CCL fields. A CCL search could then look something like:


    ti=computer and au=knuth
   

To set this up you need first to define the CCL fields in a file called cclfields.zap. The syntax is

Fieldname u=use attribute s=structure attribute t=truncation attribute c=completenes attribute

Fore more information on valid attributes, please see the section below.

Specific CCL fields for a specific target can be set up by creation a file with the required fields and a filename that follows the filename convention cclfields.targetname.zap where targetname refers to the targets logical name (please see the Section called name(x) in Chapter 5)

CCL Attributes

U (use attributes)

Bib-1 is the default Use attribute set. Please refer to http://lcweb.loc.gov/z3950/agency/defns/bib1.html for valid values of the Bib-1 use attributes. Other attribute sets can be specified.

S (structure attributes)

The structure is one of the values from http://lcweb.loc.gov/z3950/agency/defns/bib1.html - 4 or it may be one of the special values: values below:

pw

This sets ZAP up to automatically set structure to either word or phrase. If the search term is only a single word like "Computer " structure is set to word and of it consist of more several words like "computer programming" structure is set to phrase.

al

This makes ZAP add the logical operator "and" between the words in a query. E.g. the query "computer programming" would be interpreted as "computer" and "programming".

ol

Same as al but uses the logic operator "or".

T (truncation attributes)

Please refer to http://lcweb.loc.gov/z3950/agency/defns/bib1.html - 5 for valid values of the truncation attributes.

In addition to the attributes listed in the above document l (left) and r (right) can be used. This enables Zap to set the truncation according to the users specification. If structure is set to e.g. t=r and the user enters "computer?" truncation is set to right truncation. If the user only enters "computer" no truncation is set.

C (completeness attributes)

Please refer to http://lcweb.loc.gov/z3950/agency/defns/bib1.html - 6 for valid values of the completeness attributes.

R (relation attributes)

Please refer to http://lcweb.loc.gov/z3950/agency/defns/bib1.html - 2 for valid values of the relation attributes.

Truncation

What characters a user can use to indicate that a word should be truncated can be set with the @truncation declaration in the cclfields.zap file. If you e.g. would like to use both "*" and "?" for truncation it would look like this:


      @truncation ? *
     

Examples

Example 8-1. CCL field definition

An example of a CCL field definition can be seen below:


       ti   u=4    s=pw    t=l,r   c=2
      
where the fieldname has been set to "ti", the Bib-1 use attribute has been set to 4 (title), structure has been set to pw so that ZAP automatically sets the attribute to either "phrase" or "word". Both left and right truncation has been enabled and completeness has been set to 2 (complete subfield).

To specify e.g. a GILS use attribute, the following syntax is used:


       ti   gils,u=2021  s=104