A catalogue is a text file containing the translation rules of the public identifier to system's files.
They make easy to use the DocBook, for they allow each user to have their files installed in a different place (e.g. your home directory, /usr/local/sgml or in any other place) though no other change on the document is necessary to be processed and "compiled".
Example 1. Example of catalogue
As in the example above, to associate an identifier to a file just follow the sequence shown:
Copy the identifier PUBLIC
Type the identifying text
Indicate the path to the associated file
Notice the identifier
"-//Conectiva SA//DTD books V1.0//EN" |
Its formation is not random and follows some pre-defined conditions.
The token "-" indicates that the used identfier isn't a registered type. Only a few identifiers are registered and those usualy belong to entities like ISO, IEEE, and others.
The second part of the identfier defines the name of the organization that created it. On the example above, Conectiva S.A.
The one before the last defines the contents (in this case a DTD[1]) and the name of the identified text.
The last element indicates the language in which the document was written. Since DocBook is a DTD written in English, the language is EN. The two letter code recommended is the ISO identification of the language.
More information can be obtained at OASIS Technical Resolution 9401:1997 (Amendment 2 to TR 9401).
The most common commands to be used on catalogues are:
The keyword PUBLIC maps public identifiers for identifiers on the system.
The keywordSYSTEM maps system identifiers for files on the system.
The keyword SGMLDECL designates the system identifier of the SGML statement that should be used.
Similar to the SGMLDECL the keyword DTDDECL identifies the SGML statement that should be used. DTDDECL makes the association of the statement with a public identifier to a DTD. Unfortunately this association isn't supported by the charge free tools available. The benefits of this statement can be achieved somehow with multiple catalogue files.
The keyword CATALOG allows a catalogue to be included inside another. This is a way to make use of several different catalogues without the need to alter them.
The keyword OVERRIDE informs whether an identifier has priority over a system identifier. The standard on most systems is that the system identifier has priority over the public one.
The keyword DELEGATE allows the association of a catalogue to a specific type of public identifier. The clause DELEGATE is very similar to the CATALOG, except by the fact that it doesn't do anything until a specific pattern is specified.
In case of a document starts with a type of document, but has no public identifier and no system identifier the clause DOCTYPE makes the association of this document with an specific DTD.
[1] |
Here are valid: DTD, DOCUMENT, ELEMENTS, ENTITIES and NONSGML. |