Adding New Searchable Fields: Bibliographic Class


A basic set of fields has been declared in the file and these can be used along with collmgr to enable or turn on searches for those fields. The basic fields currently include:

and all are based on encoding that conforms to the bib.dtd.

It may be necessary to define additional fields or to substitute values (based on different encoding practices) for the values used in this This section outlines the steps necessary to create a new map file, and the steps in the collmgr needed to take advantage of these new (i.e., additional or different) fields.

Creating and Modifying the map File

Rather than modifying the file, a new map file should be created for each collection. The file and the new map file you will create are (or will be) located in the /{DLXSROOT}/misc/b/bib/maps directory. For the purposes of this documentation, we will use the example "" for a hypothetical collection with the collection ID "patent". For more information, go to a generic overview of map files.

Each mapping element in a map file consists of the following:

This element determines what will display in the user's browser when constructing searches, and is case sensitive. It must match the value used in the collmgr (see below).
This element determines the variable name that is used in the cgi.
The "native" element provides an appropriate XPAT search that the system will use to discover the appropriate content. The search may be simple (e.g., region YR) or complex (e.g., (region origin within region citation) + (region publish within region citation))
This element is not used by BibClass and so content within the element may be omitted.
This element determines what will display in the user's browser when reporting the search and corresponding results, and is frequently used to declare an abbreviation such as "date" for "date of publication".

Create the file with any standard text editor and copy the contents of to it. Each map file consists of a section of "operator" mappings (e.g., ), followed by a section of "region" mappings; each section is introduced by a comment such as <!-- operator mapping -->. An example of an operator mapping is as follows:


Operator mappings use the synthetic element in BibClass; region mappings do not.

Begin by removing all mapping groups that are not relevant to your collection. For example, let us say that our example collection, patent, consists of records without authors; in this case, we would remove the region mapping for author that looks like this:

   <native>region L</native> 

Next, add new mappings for the fields that you would like to make searchable in the interface. (Remember, each BibClass record will typically be searchable across all fields by using the mapping entire record, which is mapped to region A.) In the following three examples, we declare (1) a new, simple field based on a single element, (2) a re-mapping of an element already declared for BibClass, and (3) a new element based on the combination of two complex searches:

       <label>patent number</label> 
       <native>region PATNO</native> 
       <summarylabel>patent #</summarylabel> 
       <native>region YR within region citation</native> 
       <label>data type</label> 
       <native>(region geoform within region citation) + (region formname)</native> 
       <summarylabel>data type</summarylabel> 

collmgr Steps Needed to Support Additional Searchable Fields

You will need to have the colldb database point to your new map file, and to declare the new searchable fields for the user interface. First, in collmgr's map field, declare your map file (e.g., Next, in collmgr's regionsearch field, add your searchable fields. These must correspond to the label elements in the mapping, described above.

You may also need to support searchable fields such as date of publication (e.g., for sorting) or ID (for record-oriented operations like using the bookbag), but not need to show these as being searchable in the user interface. In these cases, you should create mappings, but not declare the regions in collmgr.