
Valid documents are stricter. They not only follow the syntax rules, they
also comply with a specific structure, as described in a DTD.
Valid documents have a DTD. The XML processor will check that the docu-
ments are syntactically correct but it also ensures they follow the structure
described in the DTD.
Why two classes of documents? Why not have only valid documents? In
practice, some applications don’t need a DTD. Also, among those applica-
tions that do, they need the DTD only at specific steps in the process.
The DTD is useful during document creation, when it makes sense to
enforce the document structure. However, it is less useful after the ...