Chapter 5. Document type definitions (the DTD)

Much of the XML standard is dedicated to the concept of document modelling. A DTD (Document Type Definition) can be used to ensure that documents conform to pre-defined rules. This chapter explains the purpose, scope and syntax of DTDs.

Some readers may have already determined that DTDs will not be relevant to their needs. Some simple applications of XML do not require them. In other cases, DTDs may be considered inadequate, and XML Schemas (see Chapter 14 and Chapter 15) may be a better choice. In either case, this chapter can be safely ignored. Basic principles common to both DTDs and XML Schemas are explained in both chapters. However, the principles outlined in the next chapter are relevant to ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.