kprice | 9c922d8 | 2006-08-30 22:07:19 +0000 | [diff] [blame] | 1 | <?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
|
| 10 | be used to validate an XML file. After you have created a DTD, you can edit
|
| 11 | it manually, adding declarations that define elements, attributes, entities,
|
| 12 | and notations, and how they can be used for any XML files that reference the
|
| 13 | DTD file.</shortdesc>
|
| 14 | <prolog><metadata>
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 15 | <keywords><indexterm>DTD<indexterm>creating</indexterm></indexterm>
|
kprice | 9c922d8 | 2006-08-30 22:07:19 +0000 | [diff] [blame] | 16 | </keywords>
|
| 17 | </metadata></prolog>
|
| 18 | <taskbody>
|
| 19 | <context><p></p><p>The following instructions were written for the Resource
|
| 20 | perspective, but they will also work in many other perspectives.</p><p>Follow
|
| 21 | these 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
|
| 30 | the DTD, for example <userinput>MyDTD.dtd</userinput>.</cmd><info>The name
|
| 31 | of 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.
|
| 35 | To do so, click the <uicontrol>Use DTD Template</uicontrol> check box, and
|
| 36 | select 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,
|
| 40 | opens in the DTD editor. In the DTD editor, you can manually add elements,
|
| 41 | attributes, notations, entities, and comments to the DTD. If you close the
|
| 42 | file, and want to later re-open it in the DTD editor, double-click it in the
|
| 43 | Navigator view.</p></result>
|
| 44 | </taskbody>
|
| 45 | </task>
|