blob: 46ea01463387a885c01a411bc3d6291bb5e4b571 [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
MST 2003 John Fleck485fa4b2003-11-15 16:54:50 +000041xmlcatalog.1 Man page for xml catalogs, built from xmlcatalog_man.xml DocBook
42 source with "make xmlcatalog.1" or "make all"
43xmllint.1 Man page for xmllint program, built from xmllint.xml DocBook
44 source with "make xmllint.1" or "make all"
William M. Brack2ad1dff2003-11-15 10:35:20 +000045
46libxml-doc.el Control script for displaying docs under emacs
47
48
49 Given the above files, the generation of the complete documentation (as
50provided on the web by xmlsoft.org) can be created with the following steps:
51
52NOTE: Steps 1 through 5 are performed with the command "make rebuild";
53 Step 6 must be accomplished manually.
54 Steps 7 and 8 are performed with the command "make web"
55
561) Generate libxml-decl.txt, libxml-decl-list.txt and libxml-sections.txt:
57 gtkdoc-scan --module=libxml --source-dir=../ \
58 --ignore-headers="acconfig.h config.h win32config.h trio.h triostr.h
59 triop.h config-m ac.h XMLTestPrefix2.h XMLTestPrefix.h
60 triodef.h trionan.h xlink.h libxml.h libx ml2-py.h
61 libxml_wrap.h"
62
63 These three files are used by the gdk-doc routines in the following steps.
64
652) Generate the sgml documentation in the subdirectory "tmpl":
66 gtkdoc-mktmpl --module=libxml
67
683) Generate the xml documentation in the subdirectory "xml":
69 gtkdoc-mkdb --module=libxml --source-dir=../ --output-format=xml \
70 --main-sgml-file=gnome-xml.xml
71
72 This also generates the file gnome-xml.xml.
73 Note that, in order to produce "readable" documentation, the file
74 gnome-xml.xml should be manually edited in order to put in appropriate
75 titles.
76
774) Generate the main html documentation in the subdirectory "html":
78 cd html
79 gtkdoc-mkhtml libxml ../gnome-xml.xml
80 cd ../
81
82 Note that the file index.html is really not suitable, so a manual
83 substitution of a generic index is done.
84
855) Generate libxml2-api.xml:
86 ./apibuild.py
87
88 This script is a more recent addition to the documentation generation.
89 Instead of using the information from the gtk-doc routines, it actually
90 re-processes all the the library source files, extracting information
91 about the api (exported procedures and symbols, together with information
92 from the source comments within these). It produces an xml file which
93 contains all of this information, "libxml2-api.xml".
94
956) Generate libxml2-refs.xml:
96 ./parsedecl.py
97
98 This script uses the *.txt files generated by Step 1, together with the
99 files in the subdirectory xml produced in Step 3, and produces the summary
100 xml file "libxml2-refs.xml". Historically, it also used to produce
101 information on the api's in the file "libxml2-api.xml", but that step is
102 now being done by a separate script.
103
1047) Generate the site's main page:
105 xsltproc --nonet --html --output index.html site.xsl xml.html
106
107 All of the "top-level" pages (except xmlreader.html and guidelines.html)
108 which have navigation framing, are generated from this step
109
1108) Generate the contents and cross-referencing pages:
111 xsltproc --nonet --html api.xsl xml.html
112
1139) Generate the NEWS file in the top directory:
114 xsltproc --nonet --output ../NEWS news.xsl news.html
115
11610)Generate the XML Software Autoupdate file libxml2.xsa:
117 xsltproc --nonet --output libxml2.xsa xsa.xsl news.html
118
11911)Manually generate xmlcatalog.1 and xmllint.1 using manpages/docbook.xsl
120 stylesheet in docbook stylesheets
121
122 After these steps have been done, the documentation is complete.
123The search engine is then set up using the script index.py, using
124libxml2-api.xml, the HTML web pages generated above, and the HTML
125mailing list archives at gnome.org.
126
127
128Last update: 15 November 2003
129