Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XML Schemas

What is a DTD?

Document type definitions (DTDs) provide a way of writing markup rules that specify how XML documents can be validly created. When XML 1.0 was originally specified, the DTD syntax (which is not XML-based) was inherited mainly from earlier markup languages, such as SGML and HTML.

Support for DTDs has been part of SGML for many years, and unlike XML schemas, DTDs have been widely available for use with XML since the XML 1.0 specification was first published in 1996. Therefore, DTDs are still a widely available and supported grammar for authoring and defining XML document types. Almost all validating XML parsers in wide release provide some built-in support for DTDs when validating and parsing XML documents.

DTDs, however, have the following limitations:

As an alternative to DTDs, you can describe the XML document structure using XDR-based or XSD-based schemas, which offer the same benefits as DTDs but also resolve some of the limitations of DTDs.

DTDs are mainly useful when you are working with legacy XML applications that require them and do not support XML schemas.

See Also

Introduction to DTD Syntax | Authoring DTDs