1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
7
<year>1997</year><year>2009</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
23
<title>Overview</title>
28
<file>overview.xml</file>
32
<title>Background</title>
34
<p>DocBuilder has been used within the OTP project to generate
35
documentation for Erlang/OTP itself for more than ten years.
36
It has now been released as a regular Erlang/OTP application.</p>
38
<p>The intention with DocBuilder is that it should be as easy to
39
use and maintain as possible and generate adequate documentation
40
for OTP's needs. It uses frames, which can probably be regarded as
41
old-fashioned today. Hopefully, this should be improved in
44
<p>Originally, DocBuilder input was SGML files and external tools
45
was used for parsing. The internal version used in the OTP
46
project can generate not only HTML code but also LaTeX (for PDF
47
and PostScript) and nroff (for UNIX man pages). (Again, using
48
external tools). Because of this, the parsed source code is
49
transformed into a tree structure before being transformed again
50
into the desired format.</p>
54
<title>DTD Suite</title>
56
<p>Input is written as XML according to one of the DTDs and output
57
is corresponding HTML. Documentation for an Erlang/OTP application
58
is usually organized as follows:</p>
60
<tag><em>User's Guide</em></tag>
63
<seealso marker="user_guide_dtds#partDTD">part</seealso>)
64
A collection of chapters
65
(<seealso marker="user_guide_dtds#chapterDTD">chapter</seealso>).
69
<tag><em>Reference Manual</em></tag>
72
<seealso marker="refman_dtds#applicationDTD">application</seealso>
73
A collection of manual pages for modules
74
(<seealso marker="refman_dtds#erlrefDTD">erlref</seealso>),
76
(<seealso marker="refman_dtds#apprefDTD">appref</seealso>),
78
(<seealso marker="refman_dtds#comrefDTD">comref</seealso>),
80
(<seealso marker="refman_dtds#crefDTD">cref</seealso>) and
82
(<seealso marker="refman_dtds#filerefDTD">fileref</seealso>).
86
<tag><em>Release Notes</em></tag>
88
<p>Same structure as the User's Guide.</p>
92
<p>In some cases, one or more of the User's Guide, Reference Manual
93
and Release Notes are omitted. Also, it is possible to use either
94
the <c>application</c> or <c>part</c> DTD to write other types
95
of documentation for the application.</p>
97
<p>A special kind of DTD,
98
<seealso marker="fasc_dtds">fascicules</seealso>, can be used to
99
specify the different parts of the documentation, and which one
100
of those should be shown as default.</p>
104
<title>Structure of Generated HTML</title>
106
<p>The generated HTML corresponding to a <c>part</c> or
107
<c>application</c> document is split into a left frame and a right
108
frame. The left frame contains information about the document
109
and links to the included files, that is chapters or manual pages.
110
The right frame is used to display either the front page for
111
the document, or the selected chapter/manual page.</p>
113
<p>The left frame also contains links to a bibliography and a
114
glossary, which are automatically generated.</p>
116
<p>In the case of an <c>application</c> document, the left frame
117
also contains a link to an automatically generated index.</p>
121
<title>Basic Tags</title>
123
<p>All DTDs in the DocBuilder DTD suite share a basic set of tags.
124
An author can easily switch from one DTD to another and still use
125
the same basic tags. It is furthermore easy to copy pieces of
126
information from one document to another, even though they do not
127
use the same DTD.</p>
129
<p>The basic set of tags are divided into two categories:
130
<seealso marker="block_tags">block tags</seealso> and
131
<seealso marker="inline_tags">inline tags</seealso>. Block tags
132
typically define a separate block of information, like a
133
paragraph or a list. Inline tags are typically used within block
134
tags, for example a highlighted word within a paragraph.</p>
138
<title>About This Document</title>
140
<p>In this User's Guide, the structure of the different documents
141
and the meaning of the tags are explained. There are numerous
142
examples of documentation source code.</p>
144
<p>For readability and simplicity, the examples have been kept as
145
short as possible. For an example of what the generated HTML
146
will look like, it is recommended to look at the DocBuilder
147
documentation itself:</p>
149
<item>This User's Guide is written using the <c>part</c> and
150
<c>chapter</c> DTDs.</item>
152
<item>The Reference Manual is written using
153
the <c>application</c>, <c>appref</c> and <c>erlref</c> DTDs.
161
<list type="ordered">
163
<p>Create the relevant XML files.</p>
165
<p>If there are EDoc comments in a module, the function
166
<seealso marker="docb_gen#module/1">docb_gen:module/1,2</seealso>
167
can be used to generate an XML file according to
168
the <c>erlref</c> DTD for this module.</p>
172
<p>The XML files can be validated using
173
<seealso marker="docb_xml_check#validate/1">docb_xml_check:validate/1</seealso>.
178
<p>Generate HTML files by using
179
<seealso marker="docb_transform#file/1">docb_transform:file/1,2</seealso>.