[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
SGML can refer to an external file (really entity) with an external identifier, this is a public identifier or a system identifier, or both.
A typical public identifier looks like
PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" |
where "ISO 8879:1986" is the owner, "ENTITIES" is the text class and "Added Latin 1" is the text description (and "EN" is language).
A system identifier looks like
SYSTEM "htmlplus.dtd" |
where "htmlplus.dtd" is a system-specific identifier.
To map external identifiers to file names, PSGML first searches entity
catalog files and then search the list of file name templates in the
variable sgml-public-map
.
The catalog format is according to SGML/Opens resolution on entity management. The catalog consists of a series of entries and comments. A comment is delimited by `--' like in a markup declaration. The entry types recognized are described in the following table.
sgml-validate-command
).
When PSGML is looking for the file containing an external entity, the following things will be tried in order:
sgml-system-identifiers-are-preferred
is non-nil
and there is no elements containing `%s' in
sgml-public-map
. If the system identifier is a relative file name
it will be relative to the directory containing the defining entity.
sgml-local-catalogs
and
sgml-catalog-files
in order. For each catalog look first for
entries matching the public identifier, if any. Then look for other
matching entries in the order they appear in the catalog.
Currently an entry will be ignored if it is matching but its file is non-existent or unreadable. (This is under reconsideration, perhaps it should signal error instead).
sgml-system-identifiers-are-preferred
is nil
and there is no elements containing `%s' in sgml-public-map
.
sgml-public-map
. Using the catalogs are
preferred. The sgml-public-map
may disappear in a future version
of PSGML (not soon though).
The sgml-public-map
variable can contain a list of file name
templates where `%P' will be substituted with the whole public
identifier, owner is substituted for `%O', public text class for
`%C', and public text description for `%D'. The text class
will be converted to lower case and the owner and description will be
transliterated according to the variable
sgml-public-transliterations
. The templates in the list is tried
in order until an existing file is found. The sgml-public-map
is
modeled after `sgmls' environment variable SGML_PATH
and
psgml understand the following substitution characters: %%, %N, %P, %S,
%Y, %C, %L, %O, %T, and %V. The default value of
sgml-public-map
is taken from the environment variable
SGML_PATH
.
Given the public identifier above and the file name template `/usr/local/lib/sgml/%o/%c/%d', the resulting file name is
/usr/local/lib/sgml/ISO_8879:1986/entities/Added_Latin_1 |
Note: blanks are transliterated to `_' (and also `/' to `%') and the text class is down cased.
SGML_CATALOG_FILES
or if this variable
is undefined the default is
("CATALOG" "/usr/local/lib/sgml/CATALOG") |
sgml-catalog-files
, and
sgml-public-map
. This variable is automatically local to the
buffer.
nil
, PSGML will look up external entities by searching the
catalogs in sgml-local-catalogs
and sgml-catalog-files
and
only if the entity is not found in the catalogs will a given system
identifier be used. If the variable is non-nil and a system identifier is
given, the system identifier will be used for the entity. If no system
identifier is given the catalogs will searched.
SGML_PATH
. This is
the same environment variable that `sgmls' uses. If the
environment variable is undefined the default is
("%S" "/usr/local/lib/sgml/%o/%c/%d") |
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.