
<!DOCTYPE address-book SYSTEM “address-book.dtd”>
It consists of markup (<!DOCTYPE), the name of the top-level element
(
address-book), the DTD (SYSTEM “address-book.dtd”) and a right angle
bracket. As Listing 3.1 illustrates, the document type declaration appears
at the beginning of the XML document, after the XML declaration.
The top-level element of the document is selected in the declaration.
Therefore, it is possible to create a document starting with any element in
the DTD. Listing 3.3 has the same DTD as Listing 3.1, but its top-level ele-
ment is an
entry.
Listing 3.3: An Entry
<?xml version=”1.0”?>
<!DOCTYPE entry SYSTEM “address-book.dtd”>
<entry> ...