XSLT Generated Documentation for C Libraries

CStyleX is a documentation system that uses a ref.xsl and man.xsl XSLT transforms to convert an XML input file describing the interface of a module in a C library into both an HTML reference and man pages. Multiple interface definitions are compiled into an API reference that looks roughly similar to Java's javadoc. Man pages use concise GNU style troff macros. The author must create the XML input files. The input files are not created from header files or source code.

Here are some HTML reference examples and their associated XML input files that conform to the tag arragement roughly outlined in README.txt:
XML Input File HTML Reference Page
cfg.xml --> cfg.html
DOM_Element.xml --> DOM_Element.html
encdec.xml --> encdec.html
Here is the entire API Reference from libmba. A proj.xsl transform is also provided to create project web pages like those of libmba and encdec. Natrually, the author can easily adjust the transform or simply change CSS properties to make their HTML reference unique.

For example, this is the cfg_get_int block from the interface definition for libmba's cfg module:

  <meth name="get_int">
      <pre>int cfg_get_int(struct cfg *this, int *dst, int def, const char *name);</pre>
      <param name="this"/>
      <param name="dst"/>
      <param name="def"/>
      <param name="name"/>
  The <ident>cfg_get_int</ident> function ...

A wrap="true" attribute may be specified for meth and func tags to indicate that each parameter should appear indented on a new line.




cstylex-0.2.0 released
Sat May 8, 2004
All stylesheets have been updated. For the latest style sheets check libmba's docs/xml directory.

cstylex-0.1.2 released
Wed Jul 23, 2003
Prototypes containing parametersi with square brackets like char *row[] would confuse man.xsl. Brackets are now supported properly in man pages. The man.xsl stypesheet also did not properly display the two characters \0. Troff would interpret the \ as an escape. These are now escaped with \\ which troff displays correctly as a single \. The ref.xsl stylesheet has been adjusted to only print the Synopsis and Description sections if a pre child is present. There may have been other minor adjustements as well.

cstylex-0.1.1 released
Sun Mar 23, 2003
The CSS generated by ref.xsl for the HTML reference has been changed; a sans-serif font is used and a point size is not specified so that browsers can adjust font size using the normal controls (e.g. Ctrl-/Ctrl+ with Mozilla). Multiple include tags will result in an #include statement in the synopsis sections. There have been a few other small changes. The projects listed above as examples of CStyleX use these new style sheets.

cstylex-0.1.0 released
Sat Nov 16, 2002
Initial release.