Validating the XML in a document means to compare the structure, element tag names, and attributes against the specifications of a DTD file. To validate against a DTD file, you must first load it into your document.
The DOCTYPE element appears at the top of the Structure pane if a DTD file has been loaded into your document. (DTDs are sometimes loaded automatically when you import an XML file.) To replace the DTD file in a document, delete the existing DTD and then load a new one.
DTDs are written in ASCII text. They may contain embedded instructions and explanations that describe how to apply tags and order elements correctly. In InDesign, you can only view a DTD that is loaded in a document.
In the Structure pane menu, choose View DTD.
Double-click the DOCTYPE element in the Structure pane.
InDesign deletes the copy of the DTD file stored in the InDesign document, not the original DTD file. Tags that were imported with the DTD file remain in the Tags panel but are unlocked.
When you validate your document, InDesign alerts you if the XML deviates from rules established by the DTD file. It suggests ways to make the XML meet DTD file requirements. You can fix errors one at a time or view all errors in a separate window.