blob: 8aaa14c0a3dac2d90cf495c3ee21aea5f7ab94a0 [file] [log] [blame]
kprice9c922d82006-08-30 22:07:19 +00001<?xml version="1.0" encoding="utf-8"?>
2<!--Arbortext, Inc., 1988-2005, v.4002-->
3<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
4<task id="tcretdtd" xml:lang="en-us">
5<title>Creating DTDs</title>
6<titlealts>
7<searchtitle>Creating a new document type definition (DTD)</searchtitle>
8</titlealts>
9<shortdesc>A document type definition (DTD) contains a set of rules that can
10be used to validate an XML file. After you have created a DTD, you can edit
11it manually, adding declarations that define elements, attributes, entities,
12and notations, and how they can be used for any XML files that reference the
13DTD file.</shortdesc>
14<prolog><metadata>
kprice9623e9d2007-05-03 03:43:05 +000015<keywords><indexterm>DTD<indexterm>creating</indexterm></indexterm>
kprice9c922d82006-08-30 22:07:19 +000016</keywords>
17</metadata></prolog>
18<taskbody>
19<context><p></p><p>The following instructions were written for the Resource
20perspective, but they will also work in many other perspectives.</p><p>Follow
21these steps to create a new DTD:</p></context>
22<steps>
23<step><cmd>If necessary, create a project to contain the DTD.</cmd></step>
24<step><cmd>In the workbench, select <menucascade><uicontrol>File</uicontrol>
25<uicontrol>New</uicontrol><uicontrol>Other</uicontrol><uicontrol>XML</uicontrol>
26<uicontrol> DTD</uicontrol></menucascade> and click <uicontrol>Next</uicontrol>. </cmd>
27</step>
28<step><cmd>Select the project or folder that will contain the DTD.</cmd></step>
29<step><cmd>In the <uicontrol>File name</uicontrol> field, type the name of
30the DTD, for example <userinput>MyDTD.dtd</userinput>.</cmd><info>The name
31of your DTD file must end with the extension <userinput>.dtd</userinput></info>
32</step>
33<step><cmd>Click <uicontrol>Next</uicontrol>.</cmd></step>
34<step><cmd>You can use a DTD template as the basis for your new DTD file.
35To do so, click the <uicontrol>Use DTD Template</uicontrol> check box, and
36select the template you want to use.</cmd></step>
37<step><cmd>Click <uicontrol>Finish</uicontrol>.</cmd></step>
38</steps>
39<result><p>The DTD appears in the Navigator view and automatically, by default,
40opens in the DTD editor. In the DTD editor, you can manually add elements,
41attributes, notations, entities, and comments to the DTD. If you close the
42file, and want to later re-open it in the DTD editor, double-click it in the
43Navigator view.</p></result>
44</taskbody>
45</task>