docb_transform contains functions for transforming XML
documentation source code to HTML.
file(File) -> ok | {error, Reason}
file(File, Options) -> ok | {error, Reason}
Types:
File = string()
Options = [Opt]
Opt -- see below
Transforms XML documentation source code to HTML.
File is a documentation source file, given with or
without the .xml extension as Name.xml or
Name.
If File contains XML code according to a basic DTD
(chapter, erlref, ...), the resulting HTML
file is named Name.html.
If File contains XML code according to a compound DTD
(application or part), several files are
created:
Name_frame.html.
Name.html and Name_first.html.
Name_cite.html
and Name_term.html.
application DTD an index
is created, Name.kwc and Name_index.html.
File.
fascicules.xml file where
the value of the entry attribute for File is
"yes", the cover page is copied to index.html.
{html_mod, Module}, Module=atom()
{outdir, Dir}, Dir=string()
{number, Number}, Number=int()
chapter
file. Default is 1.{ptype, unix|windows}
path elements, the specified file path should be
presented.silent
{top, Index}, Index=string()
{vsn, Vsn}, Vsn=string()
{term_defs, File}, File=string()
File, which
should contain a list of tuples {Id, Name, Definition,
Owner}. See the section
<term>,
<termdef> - Glossary in the User's Guide.
{cite_defs, File}, File=string()
File, which
should contain a list of tuples {Id, Title, Info,
Owner}. See the section
<cite>,
<citedef> - Bibliography in the User's
Guide.A html_mod callback module can include the functions
specified below. Note that there is no check that the resulting
HTML code is valid. All functions are optional.
Defines a HTML snippet to be included in the head of
a document, after the <HEAD> start tag and
<TITLE> tag:
<HTML>
<HEAD>
<TITLE>...</TITLE>
- snippet is included here -
...
</HEAD>
...
</HTML>
Defines a HTML snippet to be included at the top of a
document, after the <BODY> start tag.
Defines a HTML snippet to be included at the bottom of a
document, before the </BODY> end tag.
Module:seealso(SeeAlso) -> Href
Types:
SeeAlso = Href = string()
When referring to another part of the document, or another
document, the XML tag <seealso> is used:
<seealso marker="File#Marker">...text...</seealso>.
By default, this is translated to
<A HREF="File.html#Marker>...text...</A>.
This function makes it possible to specify an alternative
translation Href of the marker attribute value
SeeAlso. For example, in OTP this is used to resolve
cross references between applications.