XML technologies / DocBook / Customizing DocBook / Extending DocBook 4 / Adding the CDList schema to DocBook 4

(Excerpt from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" by Thomas Schraitle)

To add the CDList schema, proceed as follows:

  1. Where should the CDList elements appear?
    Decide where to integrate CDList elements into the DocBookDTD. The element is cd:cd-collection, a candidate for block elements. Suitable choices include: %formal.class; (the level of equations, examples, figures and tables), %component.mix; (see dbpoolx.mod) and %divcomponent.mix; (see dbhierx.mod). This example uses the parameter entity %divcomponent.mix;.

  2. Creating the customization file
    Create your customization file and first load the CDList DTD:

<!ENTITY % cd-dtd SYSTEM "cd.dtd"> 
%cd-dtd;

  1. Customizing %divcomponent.mix;
    Customize the parameter entity %divcomponent.mix; by overriding %local.divcomponent.mix;:

<!ENTITY % local.divcomponent.mix "|cd:cd-collection"> 

  1. Load the DocBook DTD
    Add the following lines to your customization file to load the DocBook DTD:

<!ENTITY % DocBookDTD PUBLIC 
   "-//OASIS//DTD DocBook XML V4.5//EN" 
   "http://www.docbook.org/xml/4.5/docbookx.dtd"> 
%DocBookDTD;

  1. Using the customization file
    Use the customization file instead of the original DocBook file (see Validating with a DocBook 4 customization file).

If you prefer public identifiers, define an identifier (PUBLIC, SYSTEM or both). You will also need an XML catalog to resolve your identifiers.

  

back to top