Document Type Definition

What Does Document Type Definition Mean?

Document type definition (DTD) refers to a set of markup declarations that define a document type for Standard Generalized Markup Language (SGML) languages. DTDs define the structure of a class of documents through element and attribute-list declarations. DTD helps parsers validate documents. It is officially recommended by the World Wide Web Consortium (W3C). DTDs have now been largely superseded by XML Namespace-aware schema languages.

Advertisements

Techopedia Explains Document Type Definition

DTDs make two types of declarations: Internal: Forms part of the document itself and is inserted within the DOCTYPE definition near the start of the XML document. External: Points to DTD declarations contained in an external file. For security reasons, parsers and Web browsers may be prevented from reading external subsets. DTDs describe the structure of a class of documents via element and attribute-list declarations. Element declarations name the allowable set of elements within the document, and specify whether and how declared elements and runs of character data may be contained within each element. Attribute-list declarations name the allowable set of attributes for each declared element, including the type of each attribute value, or an explicit set of valid value(s). DTD markup declarations declare which element types, attribute lists, entities and notations are allowed in the structure of the corresponding class of XML documents. DTDs have certain limitations that are related to their flexibility: Differences between the DTD syntax and the XML syntax Lack of namespace awareness Lack of data typing Limited content model descriptions

Advertisements

Related Terms

Margaret Rouse
Technology Expert

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.