next up previous index
Next: XML Schema Up: XML Basics Previous: XML Basics   Index


Document Type Definitions (DTD)

Most XML documents (and all SGML documents) refer to an external document type definition (DTD). The DTD provides a list of the elements, attributes, comments, notes, and entities contained in the document. It also indicates their relationship to one another within the document. In other words, a DTD is the grammar of an XML document[8]. Without a DTD (or schema, see below), all you have is data. The DTD is rather like the header row in a table that identifies what lies below it. It does not itself contain any data, but makes the data that follows useful.

DTDs are complex and difficult to create from scratch. Luckily, there are thousands of open source DTDs from which to choose. Most of them are related to a specific industry or enterprise. Unless you have unlimited time and capital, there probably is no reason to even contemplate making a custom DTD that models your core organizational elements. The most widely distributed DTD is DocBook[6], which originally was developed for documenting computer software. Many popular DTDs, such as the Telecom Interchange Markup (TIM) are derivatives of DocBook. Because XML is extensible, you can begin with a DTD that meets your core requirements and then make minor modifications and additions to it at a later date without invalidating all your XML.

The DTD defines the taxonomy that you will use to parse information about the subject matter into re-usable form[2].



Subsections
next up previous index
Next: XML Schema Up: XML Basics Previous: XML Basics   Index
Henry Meyerding 2004-01-12