A document type definition (DTD) contains a set of rules that can be used to validate an XML file. After you have created a DTD, you can edit it manually, adding declarations that define elements, attributes, entities, and notations, and how they can be used for any XML files that reference the DTD file.
The following instructions were written for the Resource perspective, but they will also work in many other perspectives.
To create a new DTD, complete the following steps:
The DTD appears in the Navigator view and automatically, by default, opens in the DTD editor. In the DTD editor, you can manually add elements, attributes, notations, entities, and comments to the DTD. If you close the file, and want to later re-open it in the DTD editor, double-click it in the Navigator view.