Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Web Tools Guide
Previous Page Home Next Page

Document type definitions (DTDs) - overview

A document type definition (DTD) provides you with the means to validate XML files against a set of rules. When you create a DTD file, you can specify rules that control the structure of any XML files that reference the DTD file.

A DTD can contain declarations that define elements, attributes, notations, and entities for any XML files that reference the DTD file. It also establishes constraints for how each element, attribute, notation, and entity can be used within any of the XML files that reference the DTD file.

To be considered a valid XML file, the document must be accompanied by a DTD (or an XML schema), and conform to all of the declarations in the DTD (or XML schema).

Certain XML parsers have the ability to read DTDs and check to see if the XML file it is reading follows all of those rules. While the parser is reading the XML file, it will check each line to be sure that it conforms to the rules that are laid out in the DTD file. If there is a problem, the parser generates an error and points to where the error occurs in the XML file. This kind of parser is called a validating parser because it validates the content of the XML file against the DTD.

Related tasks

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire