1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</legalnotice>
<title>Reference Manual DTDs</title>
<prepared></prepared>
<docno></docno>
<date></date>
<rev></rev>
<file>refman_dtds.xml</file>
</header>
<p>There are five DTDs for writing manual pages about applications,
shell commands, C libraries, Erlang modules and files, all with a
similar structure:</p>
<list type="bulleted">
<item>A header.</item>
<item>Name of the application/command/library/module/file.</item>
<item>Short summary (one line).</item>
<item>A longer description.</item>
<item>"Formal" definitions of functions or commands.</item>
<item>Optional sections of free text.</item>
<item>Optional section with the name(s) and email(s) of the author(s).</item>
</list>
<p>The differences between the DTDs are the tags for the name,
the short summary and some tags inside the "formal" definitions.</p>
<section>
<marker id="applicationDTD"></marker>
<title>The application DTD</title>
<p>The <c>application</c> DTD is intended for a Reference Manual and
groups a set of manual pages into one unit. The structure is
similar to the part DTD: first an introduction and then the manual
pages, written in separate files with the
<seealso marker="#apprefDTD">appref</seealso>,
<seealso marker="#comrefDTD">comref</seealso>,
<seealso marker="#crefDTD">cref</seealso>,
<seealso marker="#erlrefDTD">erlref</seealso>, or
<seealso marker="#filerefDTD">fileref</seealso> DTD.</p>
<p>Example:</p>
<pre>
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE application SYSTEM "application.dtd">
<application>
<header>
<title>Application name</title>
<prepared/>
<docno/>
<date/>
<rev/>
</header>
<description>
<p>Application description...</p>
</description>
<include file="module1">
<include file="module2">
</application>
</pre>
</section>
<section>
<marker id="applicationTAG"></marker>
<title><application></title>
<p>The top level tag of an <c>application</c> DTD.</p>
<p>Contains a
<seealso marker="header_tags"><header></seealso>,
an optional
<seealso marker="user_guide_dtds#descriptionTAG"><description></seealso>,
followed by one or more
<seealso marker="user_guide_dtds#includeTAG"><include></seealso>.
</p>
</section>
<section>
<marker id="apprefDTD"></marker>
<title>The appref DTD</title>
<p>This is the DTD for writing an application manual page.</p>
<p>Example:</p>
<pre>
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<title>Application name</title>
<prepared/>
<docno/>
<date/>
<rev/>
</header>
<app>Application name</app>
<appsummary>A short application summary.</appsummary>
<description>
<p>A longer description of the application.</p>
</description>
<section>
<title>Configuration</title>
<p>...</p>
</section>
...
<authors>
<aname>Name of author</aname>
<email>Email of author</email>
</authors>
</appref>
</pre>
<section>
<marker id="apprefTAG"></marker>
<title><appref></title>
<p>The top level tag of an <c>appref</c> DTD.</p>
<p>Contains
<seealso marker="header_tags#headerTAG"><header></seealso>,
<seealso marker="#appTAG"><app></seealso>,
<seealso marker="#appsummaryTAG"><appsummary></seealso>,
<seealso marker="#descriptionTAG"><description></seealso>,
zero or more
<seealso marker="#sectionTAG"><section></seealso> and
<seealso marker="#funcsTAG"><funcs></seealso>,
followed by zero or more
<seealso marker="#authorsTAG"><authors></seealso>.</p>
</section>
<section>
<marker id="appTAG"></marker>
<title><app></title>
<p>The application name. Contains plain text.</p>
</section>
<section>
<marker id="appsummaryTAG"></marker>
<title><appsummary></title>
<p>Short summary. Contains plain text.</p>
</section>
</section>
<section>
<marker id="comrefDTD"></marker>
<title>The comref DTD</title>
<p>This is the DTD for writing a command manual page.</p>
<p>Example:</p>
<pre>
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE comref SYSTEM "comref.dtd">
<comref>
<header>
<title>Command name</title>
<prepared/>
<docno/>
<date/>
<rev/>
</header>
<com>Command name</com>
<comsummary>A short command summary.</comsummary>
<description>
<p>A long description of the command.</p>
</description>
<funcs>
<func>
<name>command</name>
<name>command -flag <arg></name>
<fsummary>A short command summary (max 40 characters).</fsummary>
<desc>
<p>An extended command description.
</desc>
</func>
</funcs>
<section>
<title>Options</title>
<p>...</p>
</section>
<authors>
<aname>Name of author</aname>
<email>Email of author</email>
</authors>
</comref>
</pre>
<section>
<marker id="comrefTAG"></marker>
<title><comref></title>
<p>The top level tag for a <c>comref</c> DTD.</p>
<p>Contains
<seealso marker="header_tags#headerTAG"><header></seealso>,
<seealso marker="#comTAG"><com></seealso>,
<seealso marker="#comsummaryTAG"><comsummary></seealso>,
<seealso marker="#descriptionTAG"><description></seealso>,
zero or more
<seealso marker="#sectionTAG"><section></seealso> and
<seealso marker="#funcsTAG"><funcs></seealso>,
followed by zero or more
<seealso marker="#authorsTAG"><authors></seealso>.</p>
</section>
<section>
<marker id="comTAG"></marker>
<title><com></title>
<p>The command name. Contains plain text.</p>
</section>
<section>
<marker id="comsummaryTAG"></marker>
<title><comsummary></title>
<p>Short summary. Contains plain text.</p>
</section>
</section>
<section>
<marker id="crefDTD"></marker>
<title>The cref DTD</title>
<p>This is the DTD for writing a C library manual page.</p>
<p>Example:</p>
<pre><![CDATA[
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE cref SYSTEM "cref.dtd">
<cref>
<header>
<title>C library name</title>
<prepared/>
<docno/>
<date/>
<rev/>
</header>
<lib>C library name</lib>
<libsummary>A short C library summary.</libsummary>
<description>
<p>A longer description of the C library.</p>
</description>
<funcs>
<func>
<name><ret>void</ret><nametext>start(bar)</nametext></name>
<name><ret>void</ret><nametext>start(foo)</nametext></name>
<fsummary>A short function summary (max 40 characters).</fsummary>
<type>
<v>char bar</v>
<v>int foo</v>
</type>
<desc>
<p>An extended function description.</p>
</desc>
</func>
...
</funcs>
<section>
<title>A title</title>
<p>Some text...</p>
</section>
</cref>
]]></pre>
<section>
<marker id="crefTAG"></marker>
<title><cref></title>
<p>The top level tag for a <c>cref</c> DTD.</p>
<p>Contains
<seealso marker="header_tags#headerTAG"><header></seealso>,
<seealso marker="#libTAG"><lib></seealso>,
<seealso marker="#libsummaryTAG"><libsummary></seealso>,
<seealso marker="#descriptionTAG"><description></seealso>,
zero or more
<seealso marker="#sectionTAG"><section></seealso> and
<seealso marker="#funcsTAG"><funcs></seealso>, followed by
zero or more
<seealso marker="#authorsTAG"><authors></seealso>.</p>
</section>
<section>
<marker id="libTAG"></marker>
<title><lib></title>
<p>The C library name or acronym. Contains plain text.</p>
</section>
<section>
<marker id="libsummaryTAG"></marker>
<title><libsummary></title>
<p>Short summary. Contains plain text.</p>
</section>
</section>
<section>
<marker id="erlrefDTD"></marker>
<title>The erlref DTD</title>
<p>This is the DTD for writing Erlang module manual pages.</p>
<p>Example:</p>
<pre>
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<title>Module name</title>
<prepared/>
<docno/>
<date/>
<rev/>
</header>
<module>Module name</module>
<modulesummary>A short module summary.</modulesummary>
<description>
<p>A longer description of the module.</p>
</description>
<funcs>
<func>
<name>start() -> Result</name>
<name>start(N) -> Result</name>
<fsummary>A short function summary (max 40 characters).</fsummary>
<type>
<v>Pid = pid()</v>
<v>N = int()</v>
<v>Result = {ok, Pid} | {error, Reason}</v>
<v>Reason = term()</v>
<d>A parameter description.</d>
</type>
<desc>
<p>An extended function description.</p>
</desc>
</func>
...
</funcs>
<section>
<title>Some Title</title>
<p>Some text...</p>
</section>
<authors>
<aname>Name of author</aname>
<email>Email of author</email>
</authors>
</erlref>
</pre>
<section>
<marker id="erlrefTAG"></marker>
<title><erlref></title>
<p>The top level tag for an <c>erlref</c> DTD.</p>
<p>Contains
<seealso marker="header_tags#headerTAG"><header></seealso>,
<seealso marker="#moduleTAG"><module></seealso>,
<seealso marker="#modulesummaryTAG"><modulesummary></seealso>,
<seealso marker="#descriptionTAG"><description></seealso>,
zero or more
<seealso marker="#sectionTAG"><section></seealso> and
<seealso marker="#funcsTAG"><funcs></seealso>,
followed by zero or more
<seealso marker="#authorsTAG"><authors></seealso>.</p>
</section>
<section>
<marker id="moduleTAG"></marker>
<title><module></title>
<p>The module name. Contains plain text.</p>
</section>
<section>
<marker id="modulesummaryTAG"></marker>
<title><modulesummary></title>
<p>Short summary. Contains plain text.</p>
</section>
</section>
<section>
<marker id="filerefDTD"></marker>
<title>The fileref DTD</title>
<p>This is the DTD for writing file manual pages. In OTP, this DTD
is used for defining the format of for example <c>.rel</c> and
<c>.app</c> files.</p>
<p>Example:</p>
<pre>
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE fileref SYSTEM "fileref.dtd">
<fileref>
<header>
<title>File name</title>
<prepared/>
<docno/>
<date/>
<rev/>
</header>
<file>fileref</file>
<filesummary>A short file summary.</filesummary>
<description>
<p>A longer description of the file.</p>
</description>
<section>
<title>File format</title>
<p>...</p>
</section>
<authors>
<aname>Name of author</aname>
<email>Email of author</email>
</authors>
</fileref>
</pre>
<p>The file reference manual can also contain function definitions,
similar to the <c>erlref</c> DTD.</p>
<section>
<marker id="filerefTAG"></marker>
<title><fileref></title>
<p>The top level tag for a <c>fileref</c> DTD.</p>
<p>Contains
<seealso marker="header_tags#headerTAG"><header></seealso>,
<seealso marker="#fileTAG"><file></seealso>,
<seealso marker="#filesummaryTAG"><filesummary></seealso>,
<seealso marker="#descriptionTAG"><description></seealso>,
zero or more
<seealso marker="#sectionTAG"><section></seealso> and
<seealso marker="#funcsTAG"><funcs></seealso>,
followed by zero or more
<seealso marker="#authorsTAG"><authors></seealso>.</p>
</section>
<section>
<marker id="fileTAG"></marker>
<title><file></title>
<p>The name of the file or file type. Contains plain text.</p>
</section>
<section>
<marker id="filesummaryTAG"></marker>
<title><filesummary></title>
<p>Short summary. Contains plain text.</p>
</section>
</section>
<section>
<marker id="descriptionTAG"></marker>
<title><description></title>
<p>The introduction after the title and before sections and
"formal" definitions.</p>
<p>Contains any combination and any number of
<seealso marker="block_tags">block tags</seealso> except
<c><![CDATA[<image>]]></c> and <c><![CDATA[<table>]]></c>.</p>
</section>
<section>
<marker id="sectionTAG"></marker>
<title><section></title>
<p>Subdivisions of the document. Contains an optional
<seealso marker="inline_tags#markerTAG"><marker></seealso>,
a <seealso marker="user_guide_dtds#titleTAG"><title></seealso>,
followed by any combination and any number of
<seealso marker="block_tags">block tags</seealso> except
<c><![CDATA[<image>]]></c> and <c><![CDATA[<table>]]></c>.</p>
</section>
<section>
<marker id="funcsTAG"></marker>
<title><funcs></title>
<p>A group of "formal" function definitions.</p>
<p>Contains one or more
<seealso marker="#funcTAG"><func></seealso>.</p>
</section>
<section>
<marker id="funcTAG"></marker>
<title><func></title>
<p>A "formal" function definition.</p>
<p>Contains one or more
<seealso marker="#nameTAG"><name></seealso>, followed by
<seealso marker="#fsummaryTAG"><fsummary></seealso>,
<seealso marker="#typeTAG"><type></seealso> (optional) and
<seealso marker="#descTAG"><desc></seealso> (optional).</p>
</section>
<section>
<marker id="nameTAG"></marker>
<title><name></title>
<p>Function/command signature with name, arguments and return value.
Contains plain text, except for the <c>cref</c> DTD where it
contains a <c><![CDATA[<ret>]]></c> (return type, plain text) and
a <c><![CDATA[<nametext>]]></c> (function name and arguments,
plain text).</p>
<p>In the case of an <c>erlref</c> DTD, it will
automatically be added a
<seealso marker="inline_tags#markerTAG">marker</seealso>,
<c><![CDATA[<marker id="Name/Arity">]]></c> or
<c><![CDATA[<marker id="Name">]]></c>, based on the contents of
this tag before the function definition.</p>
<p>Example: Consider the following name definition</p>
<pre><![CDATA[
<name>foo(Arg1, Arg2) -> ok | {error, Reason}</name>
]]></pre>
<p>Then a marker like this will be added
<c><![CDATA[<marker id="foo/2">]]></c> before the function
definition in the generated HTML. That is, referring to
the function using
<c><![CDATA[<seealso marker="#foo/2">foo/2</seealso>]]></c> will
automatically work.</p>
</section>
<section>
<marker id="fsummaryTAG"></marker>
<title><fsummary></title>
<p>Function/command summary. Contains plain text,
<seealso marker="inline_tags#cTAG"><c></seealso> and
<seealso marker="inline_tags#emTAG"><em></seealso>.</p>
</section>
<section>
<marker id="typeTAG"></marker>
<title><type></title>
<p>Type declarations for the function/command.</p>
<p>Contains one or more pairs of
<seealso marker="#vTAG"><v></seealso> and
<seealso marker="#dTAG"><d></seealso> (optional).</p>
</section>
<section>
<marker id="vTAG"></marker>
<title><v></title>
<p>Type declaration for an argument or return value. Contains plain
text.</p>
</section>
<section>
<marker id="dTAG"></marker>
<title><d></title>
<p>Description for an argument or return value. Contains plain text,
<seealso marker="inline_tags#cTAG"><c></seealso> and
<seealso marker="inline_tags#emTAG"><em></seealso>.</p>
</section>
<section>
<marker id="descTAG"></marker>
<title><desc></title>
<p>Function/command description. Contains
<seealso marker="block_tags">block tags</seealso> except
<c><image></c> and <c><table></c>.</p>
</section>
<section>
<marker id="authorsTAG"></marker>
<title><authors></title>
<p>Authors of the manual page. The <c>authors</c> element is optional.</p>
<p>Contains one or more pairs of
<seealso marker="#anameTAG"><aname></seealso> and
<seealso marker="#emailTAG"><email></seealso>.</p>
</section>
<section>
<marker id="anameTAG"></marker>
<title><aname></title>
<p>Author name. Contains plain text.</p>
</section>
<section>
<marker id="emailTAG"></marker>
<title><email></title>
<p>Author email address. Contains plain text.</p>
</section>
</chapter>
|