The General Structure ofCustomization Layers

Although customization layers vary in complexity, most of them have the same general structure as other customization layers of similar complexity.

In the most common case, you probably want to include the entire DTD, but you want to make some small changes. These customization layers tend to look like this:

(1)
 Overrides of Entity Declarations Here
(2)
 <!ENTITY % orig-docbook "-//OASIS//DTD DocBook V3.1//EN">
 %orig-docbook;
(3)
 New/Modified Element and Attribute Declarations Here
(1)
Declare new values for parameter entities (local.*, *.element, *.attlist) that you wish to modify.
(2)
Include the entire DocBook DTD by parameter entity reference.
(3)
Add new element and attribute declarations for any elements that you added to the DTD.

In slightly more complex customization layers, the changes that you want to make are influenced by the interactions between modules. In these cases, rather than including the whole DTD at once, you include each of the modules separately, perhaps with entity or element declarations between them:


Overrides of Most Entity Declarations Here

<!ENTITY % orig-pool "-//OASIS//ELEMENTS DocBook Information Pool V3.1//EN">
%orig-pool;

Overrides of Document Hierarchy Entities Here

<!ENTITY % orig-hier "-//OASIS//ELEMENTS DocBook Document Hierarchy V3.1//EN">
%orig-hier;

New/Modified Element and Attribute Declarations Here

<!ENTITY % orig-notn "-//OASIS//ENTITIES DocBook Notations V3.1//EN">
%orig-notn;

<!ENTITY % orig-cent "-//OASIS//ENTITIES DocBook Character Entities V3.1//EN">
%orig-cent;

<!ENTITY % orig-gen  "-//OASIS//ENTITIES DocBook Additional General Entities V3.1//EN">
%orig-gen;

Finally, it's worth noting that in the rare case in which you need certain kinds of very simple, "one-off" customizations, you can do them in the document subset:


<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
Overrides of Entity Declarations Here
New/Modified Element and Attribute Declarations Here
]>
<book>...</book>