There are five DTDs for writing manual pages about applications, shell commands, C libraries, Erlang modules and files, all with a similar structure:
The differences between the DTDs are the tags for the name, the short summary and some tags inside the "formal" definitions.
The
Example:
<?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>
The top level tag of an
Contains a
This is the DTD for writing an application manual page.
Example:
<?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>
The top level tag of an
Contains
The application name. Contains plain text.
Short summary. Contains plain text.
This is the DTD for writing a command manual page.
Example:
<?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>
The top level tag for a
Contains
The command name. Contains plain text.
Short summary. Contains plain text.
This is the DTD for writing a C library manual page.
Example:
]]> C library name C library name A short C library summary. A longer description of the C library.
... void start(bar) void start(foo) A short function summary (max 40 characters). char bar int foo An extended function description.
A title Some text...
The top level tag for a
Contains
The C library name or acronym. Contains plain text.
Short summary. Contains plain text.
This is the DTD for writing Erlang module manual pages.
Example:
<?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>
The top level tag for an
Contains
The module name. Contains plain text.
Short summary. Contains plain text.
This is the DTD for writing file manual pages. In OTP, this DTD
is used for defining the format of for example
Example:
<?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>
The file reference manual can also contain function definitions,
similar to the
The top level tag for a
Contains
The name of the file or file type. Contains plain text.
Short summary. Contains plain text.
The introduction after the title and before sections and "formal" definitions.
Contains any combination and any number of
Subdivisions of the document. Contains an optional
A group of "formal" function definitions.
Contains one or more
A "formal" function definition.
Contains one or more
Function/command signature with name, arguments and return value.
Contains plain text, except for the
In the case of an
Example: Consider the following name definition
foo(Arg1, Arg2) -> ok | {error, Reason} ]]>
DocBuilder will create a marker
Function/command summary. Contains plain text,
Type declarations for the function/command.
Contains one or more pairs of
Type declaration for an argument or return value. Contains plain text.
Description for an argument or return value. Contains plain text,
Function/command description. Contains
Authors of the manual page. The
Contains one or more pairs of
Author name. Contains plain text.
Author email address. Contains plain text.