各要素宣言は、要素をどこでどのように使用するかを管理する規則のセットの元になります。要素の中には別の要素が指定でき、その中にまた別の要素を指定できるので、ドキュメントは要素の階層になります。トップレベルでは <helpvolume> がその他のすべての要素のコンテナになっています。
ヘルプ・トピックを作成するのにどのマークアップが必要かを判別するために、規則に慣れる必要があります。たとえば、章を作成したいとします。まず、次にリストされている chapter の宣言を見てください。chaphead が必要であると指定されています。次に、chaphead の規則を見てください。今度は head が必要であると指定されています。したがって、head の宣言を見てください。そしてネストにされた最後の要素 (この場合は partext) まで見てください。一般的に使用する要素に慣れるまで、マークアップを正しく入力するにはこの方法が役立ちます。
<!ELEMENT chapter - - (chaphead, text?, (s1*, rsect*)) >
<!ELEMENT chaphead - - (head, abbrev?)
-(memo | location | idx | footnote) >
<!ELEMENT head - - (partext)
-(memo | location | idx)>
<!ELEMENT partext - - ((#PCDATA . . . ))>
構造化エディタを使用すると、設計者に必要な DTD の知識を最小限にできます。エディタ・アプリケーションは DTD を「読み」、各要素に必要なタグを作成します。作成されるタグの多くは中間構造タグです。
次の正規マークアップ例は、デスクトップのテキスト・エディタのヘルプ・ボリュームからの抜粋です。関連するオンライン情報を表示するには、[フロントパネル] で [ヘルプ・ビューア] を選択します。[デスクトップの紹介] を選択し、リストされたボリュームの中から [テキスト・エディタのヘルプ] を選択します。テキスト・エディタ・ボリュームで [テキスト・エディタの使い方] を選択し、次に [既存のドキュメントを開くには] を選択します。
テキストと、対応するタグが読みやすいように、この例ではインデントを使用しています。
<s2 id=”TOOPENANEXISTINGDOCUMENT”>
<chaphead><head>
<partext>To Open an Existing Document</partext>
</head></chaphead>
<text>
<p>
<partext>You can use Text Editor or File Manager to open an
existing document.
</partext></p>
<idx><indexprimary>
<partext>document</partext></indexprimary>
<indexsub>
<partext>opening</partext></indexsub></idx>
<idx><indexprimary>
<partext>opening</partext></indexprimary>
<indexsub>
<partext>existing document</partext></indexsub></idx>
<procedure>
<chaphead><head>
<partext>From Text Editor</partext>
</head></chaphead>
<text>
<list type=”ORDER”>
<item><text><p>
<partext>Choose Open from the File menu.</partext></p>
<p>
<partext>The Open a File dialog box lists files and folders on
your system.You can browse the documents listed, or change to a
new folder to locate other files on your system.</partext>
</p></text></item>
<item><text><p>
<partext>Select the document you want to open in the Files list
or type the file name in the Open a File field.</partext></p>
<p>
<partext><emph><partext>Or,</partext></emph> if the document is
not in the current folder, first change to the folder that
contains your document. Then choose a name in the Folders list
or type the path name of the folder you wish to change to in the
Enter path or folder name field.</partext></p></text></item>
<item><text><p>
<partext>Press Return or click OK.
</partext></p></text></item></list>
<figure tonumber=”NONUMBER” entity=”TEXTEDITOROPENFILE”>
</figure></text></procedure>
<procedure><chaphead><head>
<partext>From File Manager</partext>
</head></chaphead>
<idx><indexprimary>
<partext>opening</partext></indexprimary>
<indexsub>
<partext>document from File Manager</partext></indexsub></idx>
<idx><indexprimary>
<partext>document</partext></indexprimary>
<indexsub>
<partext>opening from File Manager</partext></indexsub></idx>
<idx><indexprimary>
<partext>File Manager</partext></indexprimary>
<indexsub>
<partext>opening document</partext></indexsub></idx>
<text>
<list type=”BULLET”>
<item><text><p>
<partext>Display the document's file icon in a File Manager
window.</partext>
</p></text></item>
<item><text><p>
<partext>Do <emph><partext>one</partext></emph> of the
following:</partext></p>
<list type=”BULLET”>
<item><text><p>
<partext>Double-click the document's file icon.</partext>
</p></text></item>
<item><text><p>
<partext>Select the document, then choose Open from the Selected
menu.</partext>
</p></text></item>
<item><text><p>
<partext>Drag the document to Text Editor's control in the Front
Panel.</partext>
</p></text></item></list></text>
</item></list><text> </procedure>
<procedure><chaphead><head>
<partext>See Also</partext>
</head></chaphead>
<text>
<list type=”BULLET” spacing=”TIGHT”>
<item><text><p>
<partext><xref id=”ENTERINGANDEDITINGTEXT”></partext>
</p></text></item>
<item><text><p>
<partext><xref id=”TOSAVEADOCUMENTTOTHECURRENTFILE”></partext>
</p></text></item>
<item><text><p>
<partext><xref id=”TABLEOFCONTENTS”></partext>
</p></text></item></list></text>
</procedure></text></s2>