XPAT Image Building for Image Class version 2

These instructions are specific to the soon to be released Image Class version 2. If implementing a collection in version 1.06 or older, see Image Class Index Building.

Image Class version 1.06 (current distribution) uses XPat sgmlrgn in the process of building an XPat index. sgmlrgn relies on the Image Class DTD to "understand" the structure of the SGML. Image Class version 2 (to be distributed soon) uses XPat multirgn instead of sgmlrgn. XPAT multirgn uses a simple tags.txt (e.g., /DLXSROOT/idx/i/image-blank/tags.txt) file instead of the DTD to identify the structure to be indexed. Since not all elements, tags, and attributes of the Image Class DTD need to be searchable, a multirgn index can be more efficient to build and search against.

Image Class version 1.06 requires that the data for all image collections be combined in a single XPat index. Image Class version 2 allows each collection to have an index. This simplifies collection implementation since an XPat index with only one collection builds much faster than a multi-collection index.

Basic Steps for Setting Up a New XPat Index in Image Class version 2

  1. create /DLXSROOT/obj/c/coll directory
  2. copy valid/normalized SGML to /DLXSROOT/obj/c/coll
  3. create /DLXSROOT/idx/c/coll
  4. copy contents of /DLXSROOT/idx/i/image-blank to /DLXSROOT/idx/c/coll
  5. In the image.blank.dd file, modify all occurrences of /l1/idx and /l1/obj to match local implementation paths.
  6. In the image.cfg file, modify all occurrences of /l1/idx to match local implementation paths.
  7. In the image.inp file, modify all occurrences of /l1/lib to match local implementation paths.
  8. In the Makefile file, modify the occurrence of /l1/idx to match local implementation paths.

The /DLXSROOT/idx/i/image-blank directory is packaged with Image Class as a boiler plate for making new XPAT indexes.

It is OK to put more than one collection in a single XPat index.

Building the XPat Index

Once /DLXSROOT/idx/c/coll and /DLXSROOT/obj/c/coll are setup, building the index is a simple matter of issuing the following Make command.

cd /DLXSROOT/idx/c/coll

make all


Rebuilding the XPat Index

To update an index with a new version of the SGML, replace the sgm file in /DLXSROOT/obj/c/coll. And then follow the instructions in the above section, Building the XPat Index.