Table of Contents
This part is intended for DTD implementors. With the completed document analysis report and other project documents in hand, you implement the DTD and the SGML declaration by doing the following:
Designing the markup model for the document type and implementing it in SGML form. This work mainly involves designing and creating the element and attribute declarations. Chapter 8, Markup Model Design and Implementation describes some of these design considerations.
Using good technique for maintenance and readability. This work mainly involves the artful use of parameter entities and comments. Chapter 9, Techniques for DTD Maintenance and Readability describes some useful techniques.
Constructing the DTD to allow parts of it to be reused and customized. This work involves breaking up the DTD into modular files and using parameter entities and marked sections. Chapter 10, Techniques for DTD Reuse and Customization shows how to do this work and describes considerations for customizing an existing DTD.
Validating and testing the DTD. This work involves checking your DTD implementation with a validating parser and testing the markup model for effectiveness on real documents. Chapter 11, Validation and Testing describes some common DTD validation problems and solutions and discusses testing strategies.
These topics aren't separate sequential stages of DTD implementation; they're just different techniques that solve different problems. You're likely to move back and forth among them, especially as you gain experience. Careful planning in each area helps you avoid making “design at the keyboard” implementation decisions that are based on expediency rather than on project needs.
To use these chapters effectively, you need to understand basic SGML terminology from the ISO 8879 standard and how to read and write SGML markup declarations. (Appendix A, DTD Implementor's Quick Reference provides reference information on markup declaration syntax.) No matter what your level of expertise, you should have one of the several available SGML reference books handy (see Appendix E, Bibliography and Sources for suggestions). Remember also that existing DTDs make an excellent teaching tool.