XML technologies / DocBook / Customizing DocBook / DocBook 4 structure / DocBook modules
(Excerpt from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" by Thomas Schraitle)
The DocBook DTD is divided into five main modules, which the file docbookx.dtd reads in sequence (see the following diagram).
docbookx.dtd
|
+-- dbnotnx.mod <-- ISO-Entities
|
+-- dbcentx.mod
|
+-- dbpoolx.mod <-- calstblx.dtd, soextblx.dtd, htmltblx.mod
|
+-- dbhierx.mod
|
+-- dbgenent.mod
Diagram: Order of DocBook modules in version 4.5
The following list explains their purpose. You need it only if you want to replace an entire module in your customization file, which is rarely necessary.
docbookx.dtd-//OASIS//DTD DocBook XML V4.5//ENMain file normally referenced in system identifiers and catalog files; it references the other top-level modules.
Your customization file must include this file.
-
dbnotx.mod-//OASIS//ENTITIES DocBook Notations V4.5//EN contains notation entities; this module declares notations used in DocBook.
-
dbcentx.mod-//OASIS//ENTITIES DocBook Character Entities V4.5//EN declares and references the ISO entities.
-
dbpoolx.mod-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN contains all definitions for inline elements forming the main content of DocBook; a table model is also selected.
dbhierx.mod-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//ENdeclares elements determining DocBook’s hierarchical structure, such as books, chapters, reference pages, and so on.
dbgenent.mod-//OASIS//ENTITIES DocBook Additional General Entities V4.5//ENfor general entities, reusable text, image references, or additional notations; this file is empty by default.
Each module above, except docbookx.dtd, is loaded as follows:
<!ENTITY % NAME.module "INCLUDE">
<![ %NAME.module; [
<!ENTITY % NAME PUBLIC
"PUBLIC"
"MOD">
%NAME;
]]>Line 1: The module name, derived from the filename without the extension .mod.
Line 4: The placeholder PUBLIC represents a public identifier from the list above.
Line 5: The filename of the corresponding module.
To replace a module, define in your customization file the parameter entity %NAME.module; as IGNORE. The following example replaces the module dbgenent with another file:
<!ENTITY % dbgenent.module "IGNORE">
<!ENTITY % dbgenent SYSTEM "my-dbgenent.mod">
<!-- DocBook-DTD hier laden, siehe "Schreiben einer Anpassungsdatei für DocBook 4" -->Place the file my-dbgenent.mod in the same directory as your customization file.
DocBook table models
The file dbpoolx.mod loads the table models. DocBook provides the following modules:
calstblx.dtd-//USA-DOD//DTD Table Model 951010//ENcontains the definitions for the CALS table model in XML; for details, see Tables. The CALS table model is selected by default.
soextblx.dtd-//OASIS//DTD XML Exchange Table Model 19990315//ENsimplified table model. Enable it with the following declarations:
<!ENTITY % exchange.table.module "INCLUDE">
<!ENTITY % cals.table.module "IGNORE">htmltblx.mod-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//ENcontains the HTML table model, available by default in DocBook only since version 4.3. If you do not need HTML tables, disable them as follows:
<!ENTITY % allow.html.tables "IGNORE">ISO entities
The code point of a Unicode character is difficult to remember. Unicode characters therefore receive names that are easier to handle.
The so-called ISO entities are files (iso*.ent) compiled by the ISO committee and adapted to XML by the DocBook committee. They are referenced in the file dbcentx.mod. A list of the characters is available in DocBook Character Entity Reference.
The names are organized into categories, each in its own file, such as iso-cyr1.ent, iso-grk1.ent or iso-lat1.ent. This makes it easier to find characters for documents in Cyrillic, Greek, or Latin script.
DocBook 4 loads all entities by default. If you never need certain symbols, reduce loading time by assigning the parameter entity ISOKategorie.module the value IGNORE. (Compare the placeholder Kategorie with the following table.) For example, this line disables all Cyrillic characters:
<!ENTITY % ISOcyr1.module "IGNORE">Table: ISO entity categories
Category | Description |
amsa | Mathematical symbols: arrow relations |
amsb | Mathematical symbols: binary operators |
amsc | Mathematical symbols: delimiters |
amsn | Mathematical symbols: negated relation symbols |
amso | Mathematical symbols: ordinary symbols |
amsr | Mathematical symbols: relations |
box | Box and line drawing characters |
cyr1 | Russian Cyrillic characters |
cyr2 | Non-Russian Cyrillic characters |
dia | Diacritical marks |
grk1 | Greek characters |
grk2 | Monotonic Greek characters |
grk3 | Greek symbol characters |
grk4 | Alternative Greek symbols |
lat1 | ISO Latin 1 |
lat2 | ISO Latin 2 |
isonum | Numeric and special characters, such as fractions and typographic quotation marks |
pub | Typographic characters, such as spaces and dashes of various widths, ligatures, and so on |
tech | General technical characters |
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de