SGML on Unix Directory Hierarchy Standard | ||
---|---|---|
Prev | SGML on Unix Directory Hierarchy Standard |
We need a flexible process to deal with searching through SGML Open catalogs. Following a suggestion by Ken MacLeod, I propose the following: there will be a single, generated catalog file called /etc/sgml/catalog. This file is automatically generated when necessary by a process that mimics how startup scripts are found on most Unix systems at boot time: by reading a directory of symbolic links (to catalog files, in this case). The directory of symbolic links can simply be cat'ed in order to create a catalog file (with the Unix command cat /etc/sgml/catalog.d/* >/etc/sgml/catalog).
The symbolic link names contain two components: a two-digit number indicating the relative position of the catalog in the master catalog (where 50 means "don't care") followed by the catalog's name chosen so that it doesn't conflict with other names; I recommend using a name that includes leading directories (eg. .../dtd/docbook/catalog would get a link named 50dtd-docbook).
If system administrators don't like the idea of an auto-generated master catalog, they can use the same directory in order to build up the contents for the standard environment variable SGML_CATALOG_FILES.
Whatever solution administrators or distributors take, the configuration variable SGML_POSTPROCESS_CMD should refer to it. The contents of this variable, when executed, should result in an up-to-date catalog file (and whatever other things are necessary after installing SGML components).
It is recommended that authors of software that uses SGML Open catalogs use the location of the master catalog as a default. This makes sure that such software can be invoked without the user having to setup an environment first.