What Is DTD (Document Type Definition)

This section provides a quick introduction of DTD (Document Type Definition) - a language that can be used to define a document type for SGML or XML documents.

What Is DTD (Document Type Definition)?: DTD is a language that can be used to define a document type for SGML (Standard Generalized Markup Language) documents. Since XML (Extensible Markup Language) is a subset of SGML, DTD can also be used to define a document type for XML documents.

If an XML document is said to be valid against a DTD document type, all elements, attributes and entities in the XML document must meet their declared formats described in the DTD document type.

Main features of DTD:

Here is an example of DTD document type:

<!DOCTYPE p [
 <!ELEMENT p ANY>
]>

This example shows:

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

 XML File Browsers

 XML-JSON Document Conversion

 DOM (Document Object Model) Programming Interface

 SAX (Simple API for XML) Programming Interface

DTD (Document Type Definition) Introduction

What Is DTD (Document Type Definition)

 XML Files with Embedded DTD Statements

 XML Files with Linked External DTD Files

 Validating an XML File against a DTD Document Type

 Syntaxes of DTD Statements

 Validating an XML Document against the Specified DTD Document Type

 XSD (XML Schema Definition) Introduction

 Syntaxes of XSD Statements

 Validating XML Documents Against Specified XML Schemas

 XSL (Extensible Stylesheet Language) Introduction

 Java Implementation of XSLT

 XSLT (XSL Transformations) Introduction

 XPath (XML Path) Language

 XSLT Elements as Programming Statements

 Control and Generate XML Element in the Result

 PHP Extensions for XML Manipulation

 Processing XML with Python Scripts

 XML Notepad - XML Editor

 XML Tools Plugin for Notepad++

 XML Plugin Packages for Atom Editor

 XML 1.1 Changes and Parsing Examples

 Archived Tutorials

 References

 Full Version in PDF/EPUB