Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f540691c9d135e5645183e29ad3ba7f6 > files > 154

ocaml-stog-devel-0.9.0-1.mga4.x86_64.rpm

<page title="OCamldoc generator"
navbar-doc="active">
<p>
Stog comes with a custom OCamldoc generator. This generator modifies
the HTML code generated by the regular HTML generator so that
all these files can be handled by Stog as elements of type "ocamldoc".
</p>
<p>
This allows to embed an OCamldoc-generated HTML documentation into
a Stog-generated web site.
</p>
<p>
Moreover, it gives access to elements of the documentation identified
by ids in HTML files. For example, in this documentation, the following
code will create a link to the definition of the
<elt href="Stog_types#VALcreate_stog">Stog_types.create_stog</elt> value:
</p>
<hxml><![CDATA[<elt href="Stog_types#VALcreate_stog">text of the link to the value</elt>]]></hxml>
<p>
This ensures that references from the web site to elements of the code are
verified at "compilation" time.
</p>

<section title="Usage">
<p>
Like any other OCamldoc generator, once installed, you can use
it with the following command, in native code:
</p>
<command-line>
&gt; ocamldoc.opt -g odoc_stog.cmxs ...
</command-line>
<p>and in bytecode:</p>
<command-line>
&gt; ocamldoc -g odoc_stog.cmo ...
</command-line>
</section>

<section title="State">
<p>By now, this OCamldoc generator is more a hack of the default HTML generator.
A better generator would require to recode a lot of methods, or improve
the default HTML generator.
</p>
</section>

</page>