blob: f947171424b5e3d6dfc291772e77d924086fc6bf [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2005, v.4002-->
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="cdtdover" xml:lang="en-us">
<title>Document type definitions (DTDs) - overview</title>
<titlealts>
<searchtitle>Document type definition (DTD) - overview</searchtitle>
</titlealts>
<shortdesc>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.</shortdesc>
<prolog><metadata>
<keywords><indexterm>DTD<indexterm>overview</indexterm></indexterm>
</keywords>
</metadata></prolog>
<conbody>
<p>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.</p>
<p>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).</p>
<p>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.</p>
</conbody>
</concept>