1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
7
<year>1997</year><year>2011</year>
8
<holder>Ericsson AB. All Rights Reserved.</holder>
11
The contents of this file are subject to the Erlang Public License,
12
Version 1.1, (the "License"); you may not use this file except in
13
compliance with the License. You should have received a copy of the
14
Erlang Public License along with this software. If not, it can be
15
retrieved online at http://www.erlang.org/.
17
Software distributed under the License is distributed on an "AS IS"
18
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19
the License for the specific language governing rights and limitations
24
<title>Reference Manual DTDs</title>
29
<file>refman_dtds.xml</file>
32
<p>There are five DTDs for writing manual pages about applications,
33
shell commands, C libraries, Erlang modules and files, all with a
34
similar structure:</p>
36
<list type="bulleted">
37
<item>A header.</item>
38
<item>Name of the application/command/library/module/file.</item>
39
<item>Short summary (one line).</item>
40
<item>A longer description.</item>
41
<item>"Formal" definitions of functions or commands.</item>
42
<item>Optional sections of free text.</item>
43
<item>Optional section with the name(s) and email(s) of the author(s).</item>
46
<p>The differences between the DTDs are the tags for the name,
47
the short summary and some tags inside the "formal" definitions.</p>
50
<marker id="applicationDTD"></marker>
51
<title>The application DTD</title>
53
<p>The <c>application</c> DTD is intended for a Reference Manual and
54
groups a set of manual pages into one unit. The structure is
55
similar to the part DTD: first an introduction and then the manual
56
pages, written in separate files with the
57
<seealso marker="#apprefDTD">appref</seealso>,
58
<seealso marker="#comrefDTD">comref</seealso>,
59
<seealso marker="#crefDTD">cref</seealso>,
60
<seealso marker="#erlrefDTD">erlref</seealso>, or
61
<seealso marker="#filerefDTD">fileref</seealso> DTD.</p>
65
<?xml version="1.0" encoding="latin1" ?>
66
<!DOCTYPE application SYSTEM "application.dtd">
69
<title>Application name</title>
77
<p>Application description...</p>
80
<include file="module1">
81
<include file="module2">
87
<marker id="applicationTAG"></marker>
88
<title><application></title>
90
<p>The top level tag of an <c>application</c> DTD.</p>
93
<seealso marker="header_tags"><header></seealso>,
95
<seealso marker="user_guide_dtds#descriptionTAG"><description></seealso>,
96
followed by one or more
97
<seealso marker="user_guide_dtds#includeTAG"><include></seealso>.
102
<marker id="apprefDTD"></marker>
103
<title>The appref DTD</title>
105
<p>This is the DTD for writing an application manual page.</p>
109
<?xml version="1.0" encoding="latin1" ?>
110
<!DOCTYPE appref SYSTEM "appref.dtd">
113
<title>Application name</title>
120
<app>Application name</app>
122
<appsummary>A short application summary.</appsummary>
125
<p>A longer description of the application.</p>
129
<title>Configuration</title>
137
<aname>Name of author</aname>
138
<email>Email of author</email>
144
<marker id="apprefTAG"></marker>
145
<title><appref></title>
147
<p>The top level tag of an <c>appref</c> DTD.</p>
150
<seealso marker="header_tags#headerTAG"><header></seealso>,
151
<seealso marker="#appTAG"><app></seealso>,
152
<seealso marker="#appsummaryTAG"><appsummary></seealso>,
153
<seealso marker="#descriptionTAG"><description></seealso>,
155
<seealso marker="#sectionTAG"><section></seealso> and
156
<seealso marker="#funcsTAG"><funcs></seealso>,
157
followed by zero or more
158
<seealso marker="#authorsTAG"><authors></seealso>.</p>
162
<marker id="appTAG"></marker>
163
<title><app></title>
165
<p>The application name. Contains plain text.</p>
169
<marker id="appsummaryTAG"></marker>
170
<title><appsummary></title>
172
<p>Short summary. Contains plain text.</p>
177
<marker id="comrefDTD"></marker>
178
<title>The comref DTD</title>
180
<p>This is the DTD for writing a command manual page.</p>
184
<?xml version="1.0" encoding="latin1" ?>
185
<!DOCTYPE comref SYSTEM "comref.dtd">
188
<title>Command name</title>
195
<com>Command name</com>
197
<comsummary>A short command summary.</comsummary>
200
<p>A long description of the command.</p>
205
<name>command</name>
206
<name>command -flag <arg></name>
207
<fsummary>A short command summary (max 40 characters).</fsummary>
209
<p>An extended command description.
215
<title>Options</title>
221
<aname>Name of author</aname>
222
<email>Email of author</email>
228
<marker id="comrefTAG"></marker>
229
<title><comref></title>
231
<p>The top level tag for a <c>comref</c> DTD.</p>
234
<seealso marker="header_tags#headerTAG"><header></seealso>,
235
<seealso marker="#comTAG"><com></seealso>,
236
<seealso marker="#comsummaryTAG"><comsummary></seealso>,
237
<seealso marker="#descriptionTAG"><description></seealso>,
239
<seealso marker="#sectionTAG"><section></seealso> and
240
<seealso marker="#funcsTAG"><funcs></seealso>,
241
followed by zero or more
242
<seealso marker="#authorsTAG"><authors></seealso>.</p>
246
<marker id="comTAG"></marker>
247
<title><com></title>
249
<p>The command name. Contains plain text.</p>
253
<marker id="comsummaryTAG"></marker>
255
<title><comsummary></title>
257
<p>Short summary. Contains plain text.</p>
262
<marker id="crefDTD"></marker>
263
<title>The cref DTD</title>
265
<p>This is the DTD for writing a C library manual page.</p>
269
<?xml version="1.0" encoding="latin1" ?>
270
<!DOCTYPE cref SYSTEM "cref.dtd">
273
<title>C library name</title>
280
<lib>C library name</lib>
282
<libsummary>A short C library summary.</libsummary>
285
<p>A longer description of the C library.</p>
290
<name><ret>void</ret><nametext>start(bar)</nametext></name>
291
<name><ret>void</ret><nametext>start(foo)</nametext></name>
292
<fsummary>A short function summary (max 40 characters).</fsummary>
298
<p>An extended function description.</p>
306
<title>A title</title>
316
<marker id="crefTAG"></marker>
317
<title><cref></title>
319
<p>The top level tag for a <c>cref</c> DTD.</p>
322
<seealso marker="header_tags#headerTAG"><header></seealso>,
323
<seealso marker="#libTAG"><lib></seealso>,
324
<seealso marker="#libsummaryTAG"><libsummary></seealso>,
325
<seealso marker="#descriptionTAG"><description></seealso>,
327
<seealso marker="#sectionTAG"><section></seealso> and
328
<seealso marker="#funcsTAG"><funcs></seealso>, followed by
330
<seealso marker="#authorsTAG"><authors></seealso>.</p>
334
<marker id="libTAG"></marker>
335
<title><lib></title>
337
<p>The C library name or acronym. Contains plain text.</p>
341
<marker id="libsummaryTAG"></marker>
342
<title><libsummary></title>
344
<p>Short summary. Contains plain text.</p>
349
<marker id="erlrefDTD"></marker>
350
<title>The erlref DTD</title>
352
<p>This is the DTD for writing Erlang module manual pages.</p>
356
<?xml version="1.0" encoding="latin1" ?>
357
<!DOCTYPE erlref SYSTEM "erlref.dtd">
360
<title>Module name</title>
367
<module>Module name</module>
369
<modulesummary>A short module summary.</modulesummary>
372
<p>A longer description of the module.</p>
377
<name>start() -> Result</name>
378
<name>start(N) -> Result</name>
379
<fsummary>A short function summary (max 40 characters).</fsummary>
381
<v>Pid = pid()</v>
382
<v>N = int()</v>
383
<v>Result = {ok, Pid} | {error, Reason}</v>
384
<v>Reason = term()</v>
385
<d>A parameter description.</d>
388
<p>An extended function description.</p>
396
<title>Some Title</title>
397
<p>Some text...</p>
401
<aname>Name of author</aname>
402
<email>Email of author</email>
408
<marker id="erlrefTAG"></marker>
409
<title><erlref></title>
411
<p>The top level tag for an <c>erlref</c> DTD.</p>
414
<seealso marker="header_tags#headerTAG"><header></seealso>,
415
<seealso marker="#moduleTAG"><module></seealso>,
416
<seealso marker="#modulesummaryTAG"><modulesummary></seealso>,
417
<seealso marker="#descriptionTAG"><description></seealso>,
419
<seealso marker="#sectionTAG"><section></seealso> and
420
<seealso marker="#funcsTAG"><funcs></seealso>,
421
followed by zero or more
422
<seealso marker="#authorsTAG"><authors></seealso>.</p>
426
<marker id="moduleTAG"></marker>
427
<title><module></title>
429
<p>The module name. Contains plain text.</p>
433
<marker id="modulesummaryTAG"></marker>
434
<title><modulesummary></title>
436
<p>Short summary. Contains plain text.</p>
441
<marker id="filerefDTD"></marker>
442
<title>The fileref DTD</title>
444
<p>This is the DTD for writing file manual pages. In OTP, this DTD
445
is used for defining the format of for example <c>.rel</c> and
446
<c>.app</c> files.</p>
450
<?xml version="1.0" encoding="latin1" ?>
451
<!DOCTYPE fileref SYSTEM "fileref.dtd">
454
<title>File name</title>
461
<file>fileref</file>
463
<filesummary>A short file summary.</filesummary>
466
<p>A longer description of the file.</p>
470
<title>File format</title>
476
<aname>Name of author</aname>
477
<email>Email of author</email>
482
<p>The file reference manual can also contain function definitions,
483
similar to the <c>erlref</c> DTD.</p>
486
<marker id="filerefTAG"></marker>
487
<title><fileref></title>
489
<p>The top level tag for a <c>fileref</c> DTD.</p>
492
<seealso marker="header_tags#headerTAG"><header></seealso>,
493
<seealso marker="#fileTAG"><file></seealso>,
494
<seealso marker="#filesummaryTAG"><filesummary></seealso>,
495
<seealso marker="#descriptionTAG"><description></seealso>,
497
<seealso marker="#sectionTAG"><section></seealso> and
498
<seealso marker="#funcsTAG"><funcs></seealso>,
499
followed by zero or more
500
<seealso marker="#authorsTAG"><authors></seealso>.</p>
504
<marker id="fileTAG"></marker>
505
<title><file></title>
507
<p>The name of the file or file type. Contains plain text.</p>
511
<marker id="filesummaryTAG"></marker>
512
<title><filesummary></title>
514
<p>Short summary. Contains plain text.</p>
519
<marker id="descriptionTAG"></marker>
520
<title><description></title>
522
<p>The introduction after the title and before sections and
523
"formal" definitions.</p>
525
<p>Contains any combination and any number of
526
<seealso marker="block_tags">block tags</seealso> except
527
<c><![CDATA[<image>]]></c> and <c><![CDATA[<table>]]></c>.</p>
531
<marker id="sectionTAG"></marker>
532
<title><section></title>
534
<p>Subdivisions of the document. Contains an optional
535
<seealso marker="inline_tags#markerTAG"><marker></seealso>,
536
a <seealso marker="user_guide_dtds#titleTAG"><title></seealso>,
538
followed by any combination and any number of
539
<seealso marker="block_tags">block tags</seealso> except
540
<c><![CDATA[<image>]]></c> and <c><![CDATA[<table>]]></c>.</p>
544
<marker id="funcsTAG"></marker>
545
<title><funcs></title>
547
<p>A group of "formal" function definitions.</p>
549
<p>Contains one or more
550
<seealso marker="#funcTAG"><func></seealso>.</p>
554
<marker id="funcTAG"></marker>
555
<title><func></title>
557
<p>A "formal" function definition.</p>
559
<p>Contains one or more
560
<seealso marker="#nameTAG"><name></seealso>, followed by
561
<seealso marker="#fsummaryTAG"><fsummary></seealso>,
562
<seealso marker="#typeTAG"><type></seealso> (optional) and
563
<seealso marker="#descTAG"><desc></seealso> (optional).</p>
567
<marker id="nameTAG"></marker>
568
<title><name></title>
570
<p>Function/command signature with name, arguments and return value.
571
Contains plain text, except for the <c>cref</c> DTD where it
572
contains a <c><![CDATA[<ret>]]></c> (return type, plain text) and
573
a <c><![CDATA[<nametext>]]></c> (function name and arguments,
576
<p>In the case of an <c>erlref</c> DTD, it will
577
automatically be added a
578
<seealso marker="inline_tags#markerTAG">marker</seealso>,
579
<c><![CDATA[<marker id="Name/Arity">]]></c> or
580
<c><![CDATA[<marker id="Name">]]></c>, based on the contents of
581
this tag before the function definition.</p>
583
<p>Example: Consider the following name definition</p>
585
<name>foo(Arg1, Arg2) -> ok | {error, Reason}</name>
588
<p>Then a marker like this will be added
589
<c><![CDATA[<marker id="foo/2">]]></c> before the function
590
definition in the generated HTML. That is, referring to
592
<c><![CDATA[<seealso marker="#foo/2">foo/2</seealso>]]></c> will
593
automatically work.</p>
597
<marker id="fsummaryTAG"></marker>
598
<title><fsummary></title>
600
<p>Function/command summary. Contains plain text,
601
<seealso marker="inline_tags#cTAG"><c></seealso> and
602
<seealso marker="inline_tags#emTAG"><em></seealso>.</p>
606
<marker id="typeTAG"></marker>
607
<title><type></title>
609
<p>Type declarations for the function/command.</p>
611
<p>Contains one or more pairs of
612
<seealso marker="#vTAG"><v></seealso> and
613
<seealso marker="#dTAG"><d></seealso> (optional).</p>
617
<marker id="vTAG"></marker>
618
<title><v></title>
620
<p>Type declaration for an argument or return value. Contains plain
625
<marker id="dTAG"></marker>
626
<title><d></title>
628
<p>Description for an argument or return value. Contains plain text,
629
<seealso marker="inline_tags#cTAG"><c></seealso> and
630
<seealso marker="inline_tags#emTAG"><em></seealso>.</p>
634
<marker id="descTAG"></marker>
635
<title><desc></title>
637
<p>Function/command description. Contains
638
<seealso marker="block_tags">block tags</seealso> except
639
<c><image></c> and <c><table></c>.</p>
643
<marker id="authorsTAG"></marker>
644
<title><authors></title>
646
<p>Authors of the manual page. The <c>authors</c> element is optional.</p>
648
<p>Contains one or more pairs of
649
<seealso marker="#anameTAG"><aname></seealso> and
650
<seealso marker="#emailTAG"><email></seealso>.</p>
654
<marker id="anameTAG"></marker>
655
<title><aname></title>
657
<p>Author name. Contains plain text.</p>
661
<marker id="emailTAG"></marker>
662
<title><email></title>
664
<p>Author email address. Contains plain text.</p>