Move to a third-party documentation generator
The documentation is currently built by running doc/apibuild.py
which contains a custom parser for a subset of C and creates an XML file libxml2-api.xml
. This XML file is then transformed with XSLT stylesheets to HTML. All this custom infrastructure is painful to maintain and extend and could be replaced with a third-party documentation generator.
But libxml2-api.xml
is used in a few other places as well
- to auto-generate most of the Python bindings with
python/generator.py
- to generate
testapi.c
withgentest.py
Many documentation generators can also produce XML output which can probably be used by these scripts with relatively minor changes. The main issue is that we need to track which feature macros like LIBXML_HTML_ENABLED
enable a certain symbol. Some symbols depend on Boolean expressions involving multiple macros. apibuild.py
can extract this data automatically and even verifies that conditions in headers and implementation files match.