XML technologies / DocBook / Customizing DocBook / DocBook 4 structure / DocBook Parameter entities
(Excerpt from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" by Thomas Schraitle)
DocBook 4 makes extensive use of parameter entities. This lets you change the DTD without modifying the original modules themselves. These parameter entities follow a naming scheme. In the following table, the asterisk (*) can stand for an element or attribute name, or an abstract description.
Table: DocBook 4 parameter entity conventions
P. E. for | Description |
Class | |
Collection | |
Module | |
Element | |
Attribute list | |
Multiple | |
Local | |
To illustrate how these parameter entities work together, the following example shows the chapter module:
Example: Parameter entities in the chapter module
<!ENTITY % chapter.module "INCLUDE">
<![%chapter.module;[
<!ENTITY % local.chapter.attrib "">
<!ENTITY % chapter.role.attrib "%role.attrib;">
<!ENTITY % chapter.element "INCLUDE">
<![%chapter.element;[
<!--doc:A chapter, as of a book.-->
<!ELEMENT chapter %ho; (beginpage?,
chapterinfo?,
(%bookcomponent.title.content;),
(%nav.class;)*,
tocchap?,
(%bookcomponent.content;),
(%nav.class;)*)
%ubiq.inclusion;>
<!--end of chapter.element-->]]>
<!ENTITY % chapter.attlist "INCLUDE">
<![%chapter.attlist;[
<!ATTLIST chapter
%label.attrib;
%status.attrib;
%common.attrib;
%chapter.role.attrib;
%local.chapter.attrib;>
<!--end of chapter.attlist-->]]>
<!--end of chapter.module-->]]>
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
back to top