Item 5. Comment DTDs Liberally
DTDs can be as obfuscated as C++ code written by a first-year undergrad. You should use lots of comments to explain exactly what's going on. Well-written DTDs such as the modular XHTML DTD often contain more than twice as many lines of comments as actual code. The list that follows shows some of the information you should include in a DTD.
Who wrote it and how to contact them
The copyright and use conditions that apply to the DTD
The version of the DTD
The namespace URI
The PUBLIC and SYSTEM identifiers for the DTD
The root elements
A brief description of the application the DTD models
The purpose and content of each parameter entity defined
The purpose and content of each general entity defined
The meaning of each element ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access