blob: c375f2c8b7e140fe2c383cc555c0e25aeaeb1475 [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:
William M. Brack60f394e2003-11-16 06:25:42 +000057 make scan, or,
William M. Brack2ad1dff2003-11-15 10:35:20 +000058 gtkdoc-scan --module=libxml --source-dir=../ \
59 --ignore-headers="acconfig.h config.h win32config.h trio.h triostr.h
60 triop.h config-m ac.h XMLTestPrefix2.h XMLTestPrefix.h
61 triodef.h trionan.h xlink.h libxml.h libx ml2-py.h
62 libxml_wrap.h"
63
64 These three files are used by the gdk-doc routines in the following steps.
65
662) Generate the sgml documentation in the subdirectory "tmpl":
William M. Brack60f394e2003-11-16 06:25:42 +000067 make templates, or,
William M. Brack2ad1dff2003-11-15 10:35:20 +000068 gtkdoc-mktmpl --module=libxml
69
703) Generate the xml documentation in the subdirectory "xml":
William M. Brack60f394e2003-11-16 06:25:42 +000071 make xml, or,
William M. Brack2ad1dff2003-11-15 10:35:20 +000072 gtkdoc-mkdb --module=libxml --source-dir=../ --output-format=xml \
73 --main-sgml-file=gnome-xml.xml
74
75 This also generates the file gnome-xml.xml.
76 Note that, in order to produce "readable" documentation, the file
77 gnome-xml.xml should be manually edited in order to put in appropriate
78 titles.
79
804) Generate the main html documentation in the subdirectory "html":
William M. Brack60f394e2003-11-16 06:25:42 +000081 make html, or,
William M. Brack2ad1dff2003-11-15 10:35:20 +000082 cd html
83 gtkdoc-mkhtml libxml ../gnome-xml.xml
84 cd ../
85
86 Note that the file index.html is really not suitable, so a manual
87 substitution of a generic index is done.
88
895) Generate libxml2-api.xml:
90 ./apibuild.py
91
92 This script is a more recent addition to the documentation generation.
93 Instead of using the information from the gtk-doc routines, it actually
94 re-processes all the the library source files, extracting information
95 about the api (exported procedures and symbols, together with information
96 from the source comments within these). It produces an xml file which
97 contains all of this information, "libxml2-api.xml".
98
996) Generate libxml2-refs.xml:
100 ./parsedecl.py
101
102 This script uses the *.txt files generated by Step 1, together with the
103 files in the subdirectory xml produced in Step 3, and produces the summary
104 xml file "libxml2-refs.xml". Historically, it also used to produce
105 information on the api's in the file "libxml2-api.xml", but that step is
106 now being done by a separate script.
107
William M. Brack60f394e2003-11-16 06:25:42 +00001087) Generate the site's main pages:
William M. Brack2ad1dff2003-11-15 10:35:20 +0000109 xsltproc --nonet --html --output index.html site.xsl xml.html
110
111 All of the "top-level" pages (except xmlreader.html and guidelines.html)
112 which have navigation framing, are generated from this step
113
1148) Generate the contents and cross-referencing pages:
115 xsltproc --nonet --html api.xsl xml.html
116
1179) Generate the NEWS file in the top directory:
118 xsltproc --nonet --output ../NEWS news.xsl news.html
119
12010)Generate the XML Software Autoupdate file libxml2.xsa:
William M. Brack60f394e2003-11-16 06:25:42 +0000121 make libxml2.xsa, or,
William M. Brack2ad1dff2003-11-15 10:35:20 +0000122 xsltproc --nonet --output libxml2.xsa xsa.xsl news.html
123
12411)Manually generate xmlcatalog.1 and xmllint.1 using manpages/docbook.xsl
125 stylesheet in docbook stylesheets
126
127 After these steps have been done, the documentation is complete.
128The search engine is then set up using the script index.py, using
129libxml2-api.xml, the HTML web pages generated above, and the HTML
130mailing list archives at gnome.org.
131
132
133Last update: 15 November 2003
134