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//EN

Main 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//EN

declares 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//EN

for 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//EN

contains 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//EN

simplified 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//EN

contains 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
ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML

amsb

Mathematical symbols: binary operators
ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML

amsc

Mathematical symbols: delimiters
ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML

amsn

Mathematical symbols: negated relation symbols
ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML

amso

Mathematical symbols: ordinary symbols
ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML

amsr

Mathematical symbols: relations
ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML

box

Box and line drawing characters
ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML

cyr1

Russian Cyrillic characters
ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML

cyr2

Non-Russian Cyrillic characters
ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML

dia

Diacritical marks
ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML

grk1

Greek characters
ISO 8879:1986//ENTITIES Greek Letters//EN//XML

grk2

Monotonic Greek characters
ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML

grk3

Greek symbol characters
ISO 8879:1986//ENTITIES Greek Symbols//EN//XML

grk4

Alternative Greek symbols
ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML

lat1

ISO Latin 1
ISO 8879:1986//ENTITIES Added Latin 1//EN//XML

lat2

ISO Latin 2
ISO 8879:1986//ENTITIES Added Latin 2//EN//XML

isonum

Numeric and special characters, such as fractions and typographic quotation marks
ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML

pub

Typographic characters, such as spaces and dashes of various widths, ligatures, and so on
ISO 8879:1986//ENTITIES Publishing//EN//XML

tech

General technical characters
ISO 8879:1986//ENTITIES General Technical//EN//XML

  

back to top