Document Type Definition Basics

Like XML, Document Type Definitions are text, and therefore can be theoretically read by humans. DTDs can either be saved as separate files from the XML instance documents they describe or they can be saved as an internal subset of the document itself. We'll discuss this mechanism for internal versus external DTDs later in the chapter. Now let's take a look at some basic information about DTDs.

DTDs Are a Type of Schema

In the generic sense of the word, a schema is a set of information that describes the structure of another set of information. You could think of a schema as a set of rules, or a grammar for describing some kind of structured data. Schemas aren't just used with XML—databases have schemas too, which ...

Get Special Edition Using XML, Second Edition 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.