Blame doc/catalog.htm

Packit 8a864e
Packit 8a864e
<HTML>
Packit 8a864e
<HEAD>
Packit 8a864e
<TITLE>OpenSP - Catalogs</TITLE>
Packit 8a864e
</HEAD>
Packit 8a864e
<BODY>
Packit 8a864e

Catalogs

Packit 8a864e

Packit 8a864e
The entity manager generates a system identifier for every external
Packit 8a864e
entity using catalog entry files in the format defined by 
Packit 8a864e
HREF="http://www.oasis-open.org/a401.htm">SGML Open
Packit 8a864e
Technical Resolution TR9401:1997.  The entity manager will give an
Packit 8a864e
error if it is unable to generate a system identifier for an external
Packit 8a864e
entity.  Normally if the external identifier for an entity includes a
Packit 8a864e
system identifier then the entity manager will use that as the
Packit 8a864e
effective system identifier for the entity; this behaviour can be
Packit 8a864e
changed using OVERRIDE or SYSTEM entries in
Packit 8a864e
a catalog entry file.
Packit 8a864e

Packit 8a864e
A catalog entry file contains a sequence of entries in one of the
Packit 8a864e
following forms:
Packit 8a864e
Packit 8a864e
Packit 8a864e
<SAMP>PUBLIC pubid sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that <SAMP>sysid</SAMP> should be used as
Packit 8a864e
the effective system identifier if the public identifier is
Packit 8a864e
<SAMP>pubid</SAMP>.  <SAMP>Sysid</SAMP> is a
Packit 8a864e
system identifier as defined in ISO 8879 and
Packit 8a864e
<SAMP>pubid</SAMP> is a public identifier as defined in ISO
Packit 8a864e
8879.
Packit 8a864e
Packit 8a864e
<SAMP>ENTITY name sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that sysid should be used as the effective
Packit 8a864e
system identifier if the entity is a general entity whose name is
Packit 8a864e
name.
Packit 8a864e
Packit 8a864e
<SAMP>ENTITY %name sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that <SAMP>sysid</SAMP> should be used as
Packit 8a864e
the effective system identifier if the entity is a parameter entity
Packit 8a864e
whose name is name.  Note that there is no space between
Packit 8a864e
the <SAMP>%</SAMP> and the <SAMP>name</SAMP>.
Packit 8a864e
Packit 8a864e
<SAMP>DOCTYPE  name sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that <SAMP>sysid</SAMP> should be used as
Packit 8a864e
the effective system identifier if the entity is an entity declared in
Packit 8a864e
a document type declaration whose document type name is name.
Packit 8a864e
Packit 8a864e
<SAMP>LINKTYPE name sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that <SAMP>sysid</SAMP> should be used as the
Packit 8a864e
effective system identifier if the entity is an entity declared in a
Packit 8a864e
link type declaration whose link type name is name.
Packit 8a864e
Packit 8a864e
<SAMP>NOTATION name sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that <SAMP>sysid</SAMP> should be used as
Packit 8a864e
the effective system identifier for a notation whose name is
Packit 8a864e
<SAMP>name</SAMP>.
Packit 8a864e
This is relevant only with the <SAMP>-n</SAMP> option.
Packit 8a864e
Packit 8a864e
<SAMP>OVERRIDE bool</SAMP>
Packit 8a864e
Packit 8a864e
<SAMP>bool</SAMP> may be <SAMP>YES</SAMP> or
Packit 8a864e
<SAMP>NO</SAMP>.  This sets the overriding mode for entries up to the
Packit 8a864e
next occurrence of OVERRIDE or the end of the catalog entry file.  At
Packit 8a864e
the beginning of a catalog entry file the overriding mode will be NO.
Packit 8a864e
A PUBLIC, ENTITY, DOCTYPE, LINKTYPE or NOTATION entry with an
Packit 8a864e
overriding mode of YES will be used whether or not the external
Packit 8a864e
identifier has an explicit system identifier; those with an overriding
Packit 8a864e
mode of NO will be ignored if external identifier has an explicit
Packit 8a864e
system identifier.
Packit 8a864e
Packit 8a864e
<SAMP>SYSTEM sysid1 sysid2</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that sysid2 should be used as the effective
Packit 8a864e
system identifier if the system identifier specified in the external
Packit 8a864e
identifier was <SAMP>sysid1</SAMP>.
Packit 8a864e
sysid2 should always be quoted to
Packit 8a864e
ensure that it is not misinterpreted when parsed by a system that does
Packit 8a864e
not support this extension.
Packit 8a864e
Packit 8a864e
<SAMP>SGMLDECL sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that if the document does not contain an SGML declaration,
Packit 8a864e
the SGML declaration in <SAMP>sysid</SAMP> should be implied.
Packit 8a864e
Packit 8a864e
<SAMP>DTDDECL pubid sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that if the document does not contain an SGML declaration
Packit 8a864e
and uses a doctype declaration with public identifier 
Packit 8a864e
<SAMP>pubid</SAMP>, the SGML declaration in 
Packit 8a864e
<SAMP>sysid</SAMP> should be implied.
Packit 8a864e
Packit 8a864e
<SAMP>DOCUMENT sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that the document entity is <SAMP>sysid</SAMP>.
Packit 8a864e
This entry is used only with the <SAMP>-C</SAMP> option.
Packit 8a864e
Packit 8a864e
<SAMP>CATALOG sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that <SAMP>sysid</SAMP> is the system
Packit 8a864e
identifier of an additional catalog entry file to be read after this
Packit 8a864e
one.  Multiple <SAMP>CATALOG</SAMP> entries are allowed and will be
Packit 8a864e
read in order.
Packit 8a864e
Packit 8a864e
<SAMP>BASE sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that relative storage object identifiers in system
Packit 8a864e
identifiers in the catalog entry file following this entry should be
Packit 8a864e
resolved using first storage object identifier in
Packit 8a864e
<SAMP>sysid</SAMP> as the base, instead of the storage
Packit 8a864e
object identifiers of the storage objects comprising the catalog entry
Packit 8a864e
file.
Packit 8a864e
Note that the sysid must exist.
Packit 8a864e
Packit 8a864e
<SAMP>DELEGATE pubid-prefix sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that entities with a public identifier that has
Packit 8a864e
<SAMP>pubid-prefix</SAMP> as a prefix should be resolved
Packit 8a864e
using a catalog whose system identfier is
Packit 8a864e
<SAMP>sysid</SAMP>.  For more details, see 
Packit 8a864e
HREF="http://www.entmp.org/fpi-urn/delegate.html">A Proposal for
Packit 8a864e
Delegating SGML Open Catalogs.
Packit 8a864e
Packit 8a864e
<SAMP>SGML name sysid</SAMP>
Packit 8a864e
Packit 8a864e
This specifies that the SGML declaration body in <SAMP>sysid</SAMP>
Packit 8a864e
should be used when the document starts with a reference to an SGML
Packit 8a864e
declaration named <SAMP>name</SAMP>. This is an OpenSP-specific 
Packit 8a864e
extension of the SGML Open catalog format. SGML declaration references 
Packit 8a864e
are defined in 
Packit 8a864e
Annex K of ISO 8879.
Packit 8a864e
Packit 8a864e

Packit 8a864e
The delimiters can be omitted from the <SAMP>sysid</SAMP>
Packit 8a864e
provided it does not contain any white space.  Comments are allowed
Packit 8a864e
between parameters delimited by <SAMP>--</SAMP> as in SGML.
Packit 8a864e

Packit 8a864e
The entity manager will look for catalog entry files as follows:
Packit 8a864e
    Packit 8a864e
  1. Packit 8a864e
    a file called <SAMP>catalog</SAMP> in the same directory as the
    Packit 8a864e
    document entity, unless the environment variable
    Packit 8a864e
    <SAMP>SP_USE_DOCUMENT_CATALOG</SAMP> has the value <SAMP>NO</SAMP> or
    Packit 8a864e
    <SAMP>0</SAMP>;
    Packit 8a864e
  2. Packit 8a864e
    any catalog entry files specified using the <SAMP>-c</SAMP> option;
    Packit 8a864e
  3. Packit 8a864e
    a list of files specified by the environment variable
    Packit 8a864e
    <SAMP>SGML_CATALOG_FILES</SAMP>; the list is separated by colons under
    Packit 8a864e
    Unix and by semi-colons under MS-DOS and Windows; if this environment
    Packit 8a864e
    variable is not set, then a system dependent list of catalog entry
    Packit 8a864e
    files will be used.
    Packit 8a864e
    Packit 8a864e

    Packit 8a864e
    In fact catalog entry files are not restricted to being files: the
    Packit 8a864e
    name of a catalog entry file is interpreted as a system identifier.
    Packit 8a864e

    Packit 8a864e
    A match in one catalog entry file will take precedence over any match
    Packit 8a864e
    in a later catalog entry file.  A more specific matching entry in one
    Packit 8a864e
    catalog entry file will take priority over a less specific matching
    Packit 8a864e
    entry in the same catalog entry file.  For this purpose, the order of
    Packit 8a864e
    specificity is (most specific first):
    Packit 8a864e
      Packit 8a864e
    • Packit 8a864e
      <SAMP>SYSTEM</SAMP> entries;
      Packit 8a864e
    • Packit 8a864e
      <SAMP>PUBLIC</SAMP> entries;
      Packit 8a864e
    • Packit 8a864e
      <SAMP>DELEGATE</SAMP> entries ordered by the length of the prefix,
      Packit 8a864e
      longest first;
      Packit 8a864e
    • Packit 8a864e
      <SAMP>ENTITY</SAMP>, <SAMP>DOCTYPE</SAMP>, <SAMP>LINKTYPE</SAMP>,
      Packit 8a864e
      <SAMP>NOTATION</SAMP> and <SAMP>SGML</SAMP> entries.
      Packit 8a864e
      Packit 8a864e

      For the purpose of implying an SGML declaration, <SAMP>DTDDECL</SAMP>

      Packit 8a864e
      entries are more specific than <SAMP>SGMLDECL</SAMP> entries.
      Packit 8a864e
      </BODY>
      Packit 8a864e
      </HTML>