O'Reilly logo

Sams Teach Yourself XML in 10 Minutes by Andrew H. Watt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What a DTD Is

A DTD is a description of the allowed structure of a class of XML documents.

In a DTD, you declare elements, attributes, and so on that are allowed in the structure of a corresponding class of XML documents. Elements and other parts of an XML document are declared in markup declarations.

The following are the types of markup declaration in XML 1.0:

  • Element declarations

  • Attribute list declarations

  • Entity declarations

  • Notation declarations

Markup declarations may be contained in part or entirely within parameter entities.

The DTD Is Not the DOCTYPE Declaration

Earlier, when defining a valid document, this chapter indicated that a valid document complies with the constraints expressed in the DOCTYPE declaration.

It is important to be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required