< Previous | Next >

Lesson 1.1: Create your DTD

DTD files provide a basic definition for an XML document by placing certain restrictions on the format of the file.
Before you can create your DTD file and begin adding components to it, you must first create a project to contain your DTD.

Switch to the Resource perspective

  1. From the menu bar, select Window > Open Perspective > Other. The Open Perspective dialog box opens.
  2. Click Resource.
  3. Click OK. The Resource perspective will open.

Create a project

  1. Click File > New > Project.
  2. Expand the General folder and select Project. Click Next.
  3. In the Project name field, type MyProject.
  4. Click Finish.

Create a DTD

  1. Click File > New > Other.
  2. Expand the XML folder and select DTD. If you do not see the XML folder, select the Show All Wizards check box.
  3. Click Next. If you are prompted to enable XML Development capabilities, click OK.
  4. Select MyProject and in the File name field, type CDtitle.dtd.
  5. Click Finish.
The CDTitle.dtd file is created and opened in the DTD editor.

Lesson checkpoint

The DTD editor allows you to create and edit a DTD file.
Now that you have completed this lesson, you should be able to:
  • Switch perspectives.
  • Create a new project.
  • Create a DTD file.
< Previous | Next >

Feedback