What use is a DTD?


  • A DTD is very useful at data preparation time (e.g. to enforce consistency), but redundant at other times
  • If a document is well-formed, its DTD can be (almost) entirely recreated from it.
  • DTDs don't allow you to specify much by the way of content validation
  • Unlike other parts of the XML family, DTDs are not expressed in XML

The XML Schema Language addresses these issues, and may eventually replace the DTD entirely... maybe.


20 Next | First| Previous XML: the refresher