This tutorial will show you how to create a DTD.
Create a new document.
Select menu File New
or press the File New Icon
Select the DTD Schema tab
In the DTD tree, select the Element(s) leaf.
Select menu Edit Insert After or
press the Insert After icon
An Element is inserted in the tree and selected.
The form for element creation and modification is loaded in the right panel.
A default element name of 'New Element' is given.
The content model is set to EMPTY.
In the name field, change 'New Element' for 'from'.
In the Available list, select the 'GroupStart' item and press the Add button.
In the Available list, select the '#PCDATA' item and press the Add button.
In the Available list, select the 'GroupEnd' item and press the Add button.
At the bottom of this panel, press the Create button.
Change the text in the Name field from 'from' to 'to' and press the Create button.
In the Available list, select the 'GroupStart' item and press the Add button.
In the Available list, select the '#PCDATA' item and press the Add button.
In the Available list, select the 'GroupEnd' item and press the Add button.
Change the text in the Name field from 'to' to 'cc' and press the Create button.
In the Available list, select the 'GroupStart' item and press the Add button.
In the Available list, select the '#PCDATA' item and press the Add button.
In the Available list, select the 'GroupEnd' item and press the Add button.
Change the text in the Name field from 'cc' to 'date' and press the Create button.
In the Available list, select the 'GroupStart' item and press the Add button.
In the Available list, select the '#PCDATA' item and press the Add button.
In the Available list, select the 'GroupEnd' item and press the Add button.
Change the text in the Name field from 'date' to 'p' and press the Create button.
In the Available list, select the 'GroupStart' item and press the Add button.
In the Available list, select the '#PCDATA' item and press the Add button.
In the Available list, select the 'GroupEnd' item and press the Add button.
We will create now the content element.
Change the text in the Name field from 'p' to 'content' and press the Create button.
In the Available list, select the 'GroupStart' item and press the Add button.
In the Available list, select the 'p' item and press the Add button.
In the Available list, select the 'GroupEnd' item and press the Add button.
In the Selected list, select the 'p' item and press the right mouse button.
A popup menu appear.
In the Occurence section, choose the One or More (+) radio button and press the Modify button.
This qualification specified that there should be at least one paragraph in the memo.
We will create now the memo element.
Change the text in the Name field from 'content' to 'memo' and press the Create button.
In the Available list, select the 'GroupStart' item and press the Add button.
In the Available list, select the 'from' item and press the Add button.
In the Available list, select the 'to' item and press the Add button.
In the Available list, select the 'cc' item and press the Add button.
In the Available list, select the 'date' item and press the Add button.
In the Available list, select the 'content' item and press the Add button.
In the Available list, select the 'GroupEnd' item and press the Add button.
In the Selected list, select the 'cc' item and press the right mouse button.
A popup menu appear.
In the Occurence section, choose the Zero, one or More (*) radio button and press the Modify button.
This qualification specified that zero, one or more carbon copy can be entered in the memo.
You can reorder the elements in the DTD tree on the left. In this tutorial, we will shift up the 'memo' element until it is the first element in the list.
Shift up an element.
Select the element you wish to shift up.
Select the menu View Shift Up or press the
Shift Up icon
We will also shift down the 'p' element under the 'content' element.
Shift down an element.
Select the element you wish to shift down.
Select the menu View Shift Down or press
the Shift Down icon
Here is a view of the tree after the moving of elements.
It is a good idea at this stage to save our work.
Save a document with the Save As... option.
Select menu File Save As...
A Save As dialog box ask you for a file name. Enter the name you want for your DTD file.
In this tutorial, we will change the directory folder by selecting the 'samples' folder. We will name our DTD, memo.dtd and press the Save button.
You can sort items in a section of the tree.
Select the section you wish to sort. Select one of Notation(s), Entity(ies) or Element(s).
Select menu View Sort or press the Sort
icon