Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Web Tools Guide
Previous Page Home Next Page

Creating DTDs

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:

  1. Create a project to contain the DTD if needed.
  2. In the workbench, click File > New > Other and select XML > DTD . Click Next.
  3. Select the project or folder that will contain the DTD.
  4. In the File name field, type the name of the DTD, for example MyDTD.dtd. The name of your DTD file must end with the extension .dtd
  5. Click Next.
  6. Optional: You can use a DTD template as the basis for your new DTD file. To do so, click the Use DTD Template check box, and select the template you want to use.
  7. Click Finish.

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.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire