blob: c80e4f8ab9dc1ed3357e092b8ce86487e0027296 [file] [log] [blame]
William M. Brack2ad1dff2003-11-15 10:35:20 +00001 Notes on the libxml2 Documentation
2 Prepared by: William Brack <wbrack@mmm.com.hk>
3
4 After spending a lot of time tracing through Makefile.am, some Python
5scripts and some xsl scripts and xml files, I thought it might be good
6to save others some time by setting down the basic information about how
7the library documentation is created. I intend to enhance this process,
8but will keep this document up-to-date for everyone's information. Note
9that this document does not apply to the subdirectory "tutorial", which
10is separately maintained by John Fleck.
11
12 There are a relatively small number of files which form the "core" of
13the document directory. All the other files in the directory can be re-
14generated using the information present in these core files, plus the
15actual library source files (*.[ch]) in the parent directory "../" and
16it's descendants include and include/libxml. These core files, together
17with a brief description of each, are as follows:-
18
19xml.html The "main page", manually produced by Daniel Veillard
20news.html The latest news, extracted from xml.html by site.xsl
21
22benchmark.gif Illustrations used for the "main page" and subsidiaries
23gnome2.png -------
24Libxml2-Logo-180x168.gif |
25libxml.gif |
26linus.gif |
27redhat.gif |
28structure.gif \ /
29w3c.png -
30
31apibuild.py Python script which generates the file libxml2-api.xml
32parsedecl.py Python secipt which generates the file libxml2-refs.xml
33
34api.xsl xslt script to generate API cross-references APIchunk*.html
35 using information from libxml2-api.xml and libxml2-refs.xml
36news.xsl xslt script to generate ../NEWS from news.html
37site.xsl xslt script imported by api.xsl, generates most top-level
38 pages from news.html
39xsa.xsl xslt script to generate libxml.xsa from news.html
40
41xmlcatalog.1 Man page for xml catalogs
42xmllint.1 Man page for xmllint program
43
44libxml-doc.el Control script for displaying docs under emacs
45
46
47 Given the above files, the generation of the complete documentation (as
48provided on the web by xmlsoft.org) can be created with the following steps:
49
50NOTE: Steps 1 through 5 are performed with the command "make rebuild";
51 Step 6 must be accomplished manually.
52 Steps 7 and 8 are performed with the command "make web"
53
541) Generate libxml-decl.txt, libxml-decl-list.txt and libxml-sections.txt:
55 gtkdoc-scan --module=libxml --source-dir=../ \
56 --ignore-headers="acconfig.h config.h win32config.h trio.h triostr.h
57 triop.h config-m ac.h XMLTestPrefix2.h XMLTestPrefix.h
58 triodef.h trionan.h xlink.h libxml.h libx ml2-py.h
59 libxml_wrap.h"
60
61 These three files are used by the gdk-doc routines in the following steps.
62
632) Generate the sgml documentation in the subdirectory "tmpl":
64 gtkdoc-mktmpl --module=libxml
65
663) Generate the xml documentation in the subdirectory "xml":
67 gtkdoc-mkdb --module=libxml --source-dir=../ --output-format=xml \
68 --main-sgml-file=gnome-xml.xml
69
70 This also generates the file gnome-xml.xml.
71 Note that, in order to produce "readable" documentation, the file
72 gnome-xml.xml should be manually edited in order to put in appropriate
73 titles.
74
754) Generate the main html documentation in the subdirectory "html":
76 cd html
77 gtkdoc-mkhtml libxml ../gnome-xml.xml
78 cd ../
79
80 Note that the file index.html is really not suitable, so a manual
81 substitution of a generic index is done.
82
835) Generate libxml2-api.xml:
84 ./apibuild.py
85
86 This script is a more recent addition to the documentation generation.
87 Instead of using the information from the gtk-doc routines, it actually
88 re-processes all the the library source files, extracting information
89 about the api (exported procedures and symbols, together with information
90 from the source comments within these). It produces an xml file which
91 contains all of this information, "libxml2-api.xml".
92
936) Generate libxml2-refs.xml:
94 ./parsedecl.py
95
96 This script uses the *.txt files generated by Step 1, together with the
97 files in the subdirectory xml produced in Step 3, and produces the summary
98 xml file "libxml2-refs.xml". Historically, it also used to produce
99 information on the api's in the file "libxml2-api.xml", but that step is
100 now being done by a separate script.
101
1027) Generate the site's main page:
103 xsltproc --nonet --html --output index.html site.xsl xml.html
104
105 All of the "top-level" pages (except xmlreader.html and guidelines.html)
106 which have navigation framing, are generated from this step
107
1088) Generate the contents and cross-referencing pages:
109 xsltproc --nonet --html api.xsl xml.html
110
1119) Generate the NEWS file in the top directory:
112 xsltproc --nonet --output ../NEWS news.xsl news.html
113
11410)Generate the XML Software Autoupdate file libxml2.xsa:
115 xsltproc --nonet --output libxml2.xsa xsa.xsl news.html
116
11711)Manually generate xmlcatalog.1 and xmllint.1 using manpages/docbook.xsl
118 stylesheet in docbook stylesheets
119
120 After these steps have been done, the documentation is complete.
121The search engine is then set up using the script index.py, using
122libxml2-api.xml, the HTML web pages generated above, and the HTML
123mailing list archives at gnome.org.
124
125
126Last update: 15 November 2003
127