Document Type Declaration

The first thing you need to look at is the Document Type Declaration. The Document Type Declaration occurs in the prolog of an XML document.

The Document Type Declaration can refer to either or both of two possible locations for the Document Type Definition—the internal subset or the external subset. In other words, all of the Document Type Definition can be within the XML document (in the internal subset), all of the Document Type Definition can be outside the XML document (in the external subset) in a separate file (typically with the file extension .dtd), or part of the Document Type Definition can be within the XML document and part can be outside.

Caution

A common cause of confusion is the similarity in naming

Get Platinum Edition Using XHTML™, XML, and Java™ 2 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.