📄 catalog.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN"><HTML><HEAD><TITLE>SP - Catalogs</TITLE></HEAD><BODY><H1>Catalogs</H1><P>The entity manager generates a system identifier for every externalentity using catalog entry files in the format defined by <AHREF="http://www.oasis-open.org/a401.htm">SGML OpenTechnical Resolution TR9401:1997</A>. The entity manager will give anerror if it is unable to generate a system identifier for an externalentity. Normally if the external identifier for an entity includes asystem identifier then the entity manager will use that as theeffective system identifier for the entity; this behaviour can bechanged using <CODE>OVERRIDE</CODE> or <CODE>SYSTEM</CODE> entries ina catalog entry file.<P>A catalog entry file contains a sequence of entries in one of thefollowing forms:<DL><DT><SAMP>PUBLIC <VAR>pubid</VAR> <VAR>sysid</VAR></SAMP><DD>This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used asthe effective system identifier if the public identifier is<SAMP><VAR>pubid</VAR></SAMP>. <SAMP><VAR>Sysid</VAR></SAMP> is asystem identifier as defined in ISO 8879 and<SAMP><VAR>pubid</VAR></SAMP> is a public identifier as defined in ISO8879.<DT><SAMP>ENTITY <VAR>name</VAR> <VAR>sysid</VAR></SAMP><DD>This specifies that <VAR>sysid</VAR> should be used as the effectivesystem identifier if the entity is a general entity whose name is<VAR>name</VAR>.<DT><SAMP>ENTITY %<VAR>name</VAR> <VAR>sysid</VAR></SAMP><DD>This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used asthe effective system identifier if the entity is a parameter entitywhose name is <VAR>name</VAR>. Note that there is no space betweenthe <SAMP>%</SAMP> and the <SAMP><VAR>name</VAR></SAMP>.<DT><SAMP>DOCTYPE <VAR>name</VAR> <VAR>sysid</VAR></SAMP><DD>This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used asthe effective system identifier if the entity is an entity declared ina document type declaration whose document type name is <VAR>name</VAR>.<DT><SAMP>LINKTYPE <VAR>name</VAR> <VAR>sysid</VAR></SAMP><DD>This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used as theeffective system identifier if the entity is an entity declared in alink type declaration whose link type name is <VAR>name</VAR>.<DT><SAMP>NOTATION <VAR>name</VAR> <VAR>sysid</VAR></SAMP><DD>This specifies that <SAMP><VAR>sysid</VAR></SAMP> should be used asthe effective system identifier for a notation whose name is<SAMP><VAR>name</VAR></SAMP>.This is relevant only with the <SAMP>-n</SAMP> option.<DT><SAMP>OVERRIDE <VAR>bool</VAR></SAMP><DD><SAMP><VAR>bool</VAR></SAMP> may be <SAMP>YES</SAMP> or<SAMP>NO</SAMP>. This sets the overriding mode for entries up to thenext occurrence of OVERRIDE or the end of the catalog entry file. Atthe beginning of a catalog entry file the overriding mode will be NO.A PUBLIC, ENTITY, DOCTYPE, LINKTYPE or NOTATION entry with anoverriding mode of YES will be used whether or not the externalidentifier has an explicit system identifier; those with an overridingmode of NO will be ignored if external identifier has an explicitsystem identifier.<DT><SAMP>SYSTEM <VAR>sysid1</VAR> <VAR>sysid2</VAR></SAMP><DD>This specifies that <VAR>sysid2</VAR> should be used as the effectivesystem identifier if the system identifier specified in the externalidentifier was <SAMP><VAR>sysid1</VAR></SAMP>.<VAR>sysid2</VAR> should always be quoted toensure that it is not misinterpreted when parsed by a system that doesnot support this extension.<DT><A NAME="sgmldecl"><SAMP>SGMLDECL <VAR>sysid</VAR></SAMP></A><DD>This specifies that if the document does not contain an SGML declaration,the SGML declaration in <SAMP><VAR>sysid</VAR></SAMP> should be implied.<DT><SAMP>DOCUMENT <VAR>sysid</VAR></SAMP><DD>This specifies that the document entity is <SAMP><VAR>sysid</VAR></SAMP>.This entry is used only with the <SAMP>-C</SAMP> option.<DT><SAMP>CATALOG <VAR>sysid</VAR></SAMP><DD>This specifies that <SAMP><VAR>sysid</VAR></SAMP> is the systemidentifier of an additional catalog entry file to be read after thisone. Multiple <SAMP>CATALOG</SAMP> entries are allowed and will beread in order.<DT><SAMP>BASE <VAR>sysid</VAR></SAMP><DD>This specifies that relative storage object identifiers in systemidentifiers in the catalog entry file following this entry should beresolved using first storage object identifier in<SAMP><VAR>sysid</VAR></SAMP> as the base, instead of the storageobject identifiers of the storage objects comprising the catalog entryfile.Note that the <CODE><VAR>sysid</VAR></CODE> must exist.<DT><SAMP>DELEGATE <VAR>pubid-prefix</VAR> <VAR>sysid</VAR></SAMP><DD>This specifies that entities with a public identifier that has<SAMP><VAR>pubid-prefix</VAR></SAMP> as a prefix should be resolvedusing a catalog whose system identfier is<SAMP><VAR>sysid</VAR></SAMP>. For more details, see <AHREF="http://www.entmp.org/fpi-urn/delegate.html">A Proposal forDelegating SGML Open Catalogs</A>.</DL><P>The delimiters can be omitted from the <SAMP><VAR>sysid</VAR></SAMP>provided it does not contain any white space. Comments are allowedbetween parameters delimited by <SAMP>--</SAMP> as in SGML.<P>The entity manager will look for catalog entry files as follows:<OL><LI>a file called <SAMP>catalog</SAMP> in the same directory as thedocument entity, unless the environment variable<SAMP>SP_USE_DOCUMENT_CATALOG</SAMP> has the value <SAMP>NO</SAMP> or<SAMP>0</SAMP>;<LI>any catalog entry files specified using the <SAMP>-c</SAMP> option;<LI>a list of files specified by the environment variable<SAMP>SGML_CATALOG_FILES</SAMP>; the list is separated by colons underUnix and by semi-colons under MS-DOS and Windows; if this environmentvariable is not set, then a system dependent list of catalog entryfiles will be used.</OL><P>In fact catalog entry files are not restricted to being files: thename of a catalog entry file is interpreted as a system identifier.<P>A match in one catalog entry file will take precedence over any matchin a later catalog entry file. A more specific matching entry in onecatalog entry file will take priority over a less specific matchingentry in the same catalog entry file. For this purpose, the order ofspecificity is (most specific first):<UL><LI><SAMP>SYSTEM</SAMP> entries;<LI><SAMP>PUBLIC</SAMP> entries;<LI><SAMP>DELEGATE</SAMP> entries ordered by the length of the prefix,longest first;<LI><SAMP>ENTITY</SAMP>, <SAMP>DOCTYPE</SAMP>, <SAMP>LINKTYPE</SAMP> and<SAMP>NOTATION</SAMP> entries.</UL><P><ADDRESS>James Clark<BR>jjc@jclark.com</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -