A Document Type Definition lives in a file whose name
.dtd. Inside this file
are items that define tags (elements), attributes, and
other beasties to be named later.
There are two ways to connect a DTD with the content of an XML file:
You can put the DTD in a separate file from the
XML file, and refer to it using a
line at the beginning of the XML file. The
advantage of this method is that many XML files
can all refer to the same DTD.
You can put the DTD inside the
declaration at the front of the XML file. The
advantage of an internal DTD is that the file
can be validated by itself, without reference
to any external files.
If your XML file is supposed to conform to an external DTD, place a declaration of this form at the beginning of the XML file:
<?xml version="1.0"?> <!DOCTYPE
is the name of the root (highest-level) element of the
is the name of the file containing the DTD.