Home

Up

This tutorial will show you how to create a DTD.


Create a new document.

Select menu File New or press the File New Icon new2.gif (908 octets)

Create a new Element

Select the DTD Schema tab

In the DTD tree, select the Element(s) leaf.

tutor1.gif (3077 octets)

Select menu Edit Insert After or press the Insert After icon insafter.gif (913 octets)

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.

tutor2.gif (6112 octets)

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.

tutor3.gif (5608 octets)

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.

tutor4.gif (4282 octets)

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.


tutor5.gif (16527 octets)

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 up.gif (870 octets)

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 down.gif (873 octets)

Here is a view of the tree after the moving of elements.

tutor6.gif (3118 octets)


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 sortasc.gif (142 octets)

Home

Up