XML.com 
 Published on XML.com http://www.xml.com/pub/a/1999/07/schemas/dtds.html
See this if you're having trouble printing code examples

 

DTDs
By Norman Walsh
July 01, 1999

XML inherited Document Type Definitions (DTDs) from SGML. DTDs are the schema mechanism for SGML. XML Schemas are the first wide-spread attempt to replace DTDs with something "better".

DTDs can be used to define content models (the valid order and nesting of elements) and, to a limited extent, the datatypes of attributes, but they have a number of obvious limitations:

XML Schema overcome these limitations and are much more expressive than DTDs. The additional expressiveness will allow web applications to exchange XML data much more robustly without relying on ad hoc validation tools.

Although XML Schema is poised to replace DTDs, in the short term DTDs still have a number of advantages:

Warts and all, DTDs are well understood by a large community of SGML and XML programmers and consultants.

XML.com Copyright © 1998-2006 O'Reilly Media, Inc.