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:
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.