This Section explains how OASIS Open Catalogs are used by epcEdit. Catalogs are used to map an entity's external identifier and/or name to a file name, URL, or other storage object identifier.
This solution allows for a probably system-dependent (at least in the case of file names) but application-independent catalog. Though it does not handle all issues that a combination of a complete entity manager and storage manager addresses, it simplifies the use of multiple products in a great majority of cases and can in some cases (e.g., with URLs) provide internet-wide, system-independent resolution of public identifiers.
A catalog is a file if a well-defined format hat maps external identifiers and/or entity names to file names in a probably system-dependent but application-independent manner.
epcEdit's entity manager generates a system identifier for every external entity using catalog entry files in the format defined by "SGML Open Technical Resolution TR9401:1995''. Formal System Identifiers (FSIs) are defined as part of the SGML General Facilities, currently part of the Technical Corrigendum to the HyTime standard ISO/IEC 10744. "Storage object identifiers" (such as file names) are a simple subset of all FSIs. ("Storage object identifier" is frequently abbreviated "s.o.i." below.) Valid FSIs include unpathed, relative, and absolute file names and URLs as well as FSIs with explicit storage managers (as defined in the SGML General Facilities).
The entity manager will give an error if it is unable to generate a system identifier for an external entity. Normally if the external identifier for an entity includes a system identifier then the entity manager will use that as the effective system identifier for the entity; this behavior can be changed using OVERRIDE or SYSTEM entries in a catalog entry file.
A catalog entry file contains a sequence of entries in one of the following forms:
This specifies that sysid should be used as the effective system identifier if the public identifier is pubid. Sysid is a system identifier as defined in ISO 8879 and pubid is a public identifier as defined in ISO 8879.
This specifies that sysid should be used as the effective system identifier if the entity is a general entity whose name is name.
This specifies that sysid should be used as the effective system identifier if the entity is an entity declared in a document type declaration whose document type name is name.
This specifies that sysid should be used as the effective system identifier if the entity is an entity declared in a link type declaration whose link type name is name.
This specifies that sysid should be used as the effective system identifier for a notation whose name is name. This is an extension to the SGML Open format.
bool may be YES or NO. This sets the overriding mode for entries up to the next occurrence of OVERRIDE or the end of the catalog entry file. At the beginning of a catalog entry file the overriding mode will be NO. A PUBLIC, ENTITY, DOCTYPE, LINKTYPE or NOTATION entry with an overriding mode of YES will be used whether or not the external identifier has an explicit system identifier; those with an overriding mode of NO will be ignored if external identifier has an explicit system identifier. This is an extension to the SGML Open format.
This specifies that sysid2 should be used as the effective system identifier if the system identifier specified in the external identifier was sysid1. This is an extension to the SGML Open format. sysid2 should always be quoted to ensure that it is not misinterpreted when parsed by a system that does not support this extension.
This specifies that if the document does not contain an SGML declaration, the SGML declaration in sysid should be implied.
This specifies that the document entity is sysid.
This specifies that sysid is the system identifier of an additional catalog entry file to be read after this one. Multiple CATALOG entries are allowed and will be read in order. This is an extension to the SGML Open format.
This specifies that relative storage object identifiers in system identifiers in the catalog entry file following this entry should be resolved using first storage object identifier in sysid as the base, instead of the storage object identifiers of the storage objects comprising the catalog entry file. This is an extension to the SGML Open format. This extension is proposed in ``Using SGML Open Catalogs and MIME to Exchange SGML Documents''.
This specifies that entities with a public identifier that has pubid-prefix as a prefix should be resolved using a catalog whose system identifier is sysid. For more details, see "A Proposal for Delegating SGML Open Catalogs''. This is an extension to the SGML Open format.
The delimiters can be omitted from the sysid provided it does not contain any white space. Comments are allowed between parameters delimited by -- as in SGML.
The environment variable SGML_CATALOG_FILES contains a list of catalog entry files. The list is separated by colons under Unix and by semi-colons under MS-DOS and Windows. These will be searched after the catalog entry file called catalog in the same place as the document entity. If this environment variable is not set, then a system dependent list of catalog entry files will be used. In fact catalog entry files are not restricted to being files: the name of a catalog entry file is interpreted as a system identifier.
A match in one catalog entry file will take precedence over any match in a later catalog entry file. A more specific matching entry in one catalog entry file will take priority over a less specific matching entry in the same catalog entry file. For this purpose, the order of specificity is (most specific first):
PUBLIC entries;
DELEGATE entries ordered by the length of the prefix, longest first;
ENTITY, DOCTYPE, LINKTYPE and NOTATION entries.