Document Type Definitions

If the W3C XML Schema Language is a Torx screwdriver, then DTDs are the old reliable flathead screwdriver, not nearly as sexy but a lot more practical and a lot easier to find at the corner store. Contrary to popular belief, schemas do not replace DTDs. DTDs are an extremely well-tested, well-understood, broadly supported, compact syntax for expressing constraints on XML documents. Furthermore, DTDs can do things that none of the other schema languages can accomplish, notably entity definition. Finally, a document can have both a schema and a DTD.

Don't reject DTDs simply because they're not as hip as schemas. Indeed, if your constraints are limited to the element and attribute structure of a document and do not involve ...

Get Effective XML: 50 Specific Ways to Improve Your XML 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.