blob: 8aaa14c0a3dac2d90cf495c3ee21aea5f7ab94a0 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2005, v.4002-->
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="tcretdtd" xml:lang="en-us">
<title>Creating DTDs</title>
<titlealts>
<searchtitle>Creating a new document type definition (DTD)</searchtitle>
</titlealts>
<shortdesc>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.</shortdesc>
<prolog><metadata>
<keywords><indexterm>DTD<indexterm>creating</indexterm></indexterm>
</keywords>
</metadata></prolog>
<taskbody>
<context><p></p><p>The following instructions were written for the Resource
perspective, but they will also work in many other perspectives.</p><p>Follow
these steps to create a new DTD:</p></context>
<steps>
<step><cmd>If necessary, create a project to contain the DTD.</cmd></step>
<step><cmd>In the workbench, select <menucascade><uicontrol>File</uicontrol>
<uicontrol>New</uicontrol><uicontrol>Other</uicontrol><uicontrol>XML</uicontrol>
<uicontrol> DTD</uicontrol></menucascade> and click <uicontrol>Next</uicontrol>. </cmd>
</step>
<step><cmd>Select the project or folder that will contain the DTD.</cmd></step>
<step><cmd>In the <uicontrol>File name</uicontrol> field, type the name of
the DTD, for example <userinput>MyDTD.dtd</userinput>.</cmd><info>The name
of your DTD file must end with the extension <userinput>.dtd</userinput></info>
</step>
<step><cmd>Click <uicontrol>Next</uicontrol>.</cmd></step>
<step><cmd>You can use a DTD template as the basis for your new DTD file.
To do so, click the <uicontrol>Use DTD Template</uicontrol> check box, and
select the template you want to use.</cmd></step>
<step><cmd>Click <uicontrol>Finish</uicontrol>.</cmd></step>
</steps>
<result><p>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.</p></result>
</taskbody>
</task>