Version 2 of DTD

Updated 2003-10-31 09:07:50

Document Type Definition

Adjunct to XML and SGML. Defines how tags can be nested, follow each other, etc. Essentially describes the contents of each valid tags as a regular expression. Beyond that it defines the attributes per tag, and their type.

Simple example:

 <!ELEMENT database (record+) >
 <!ELEMENT record (firstname,lastname,phone+)>
 <!ATTLIST record
   created NMTOKEN #IMPLIED
 >
 <!ELEMENT firstname (PCDATA)>
 <!ELEMENT lastname  (PCDATA)>
 <!ELEMENT phone     (PCDATA)>

tDom with its extension tnc can validate XML documents by a given DTD.


[ Category Acronym ]