]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* configure.in libvir.spec.in docs/Makefile.am: make sure the
authorDaniel Veillard <veillard@redhat.com>
Wed, 7 Dec 2005 13:45:20 +0000 (13:45 +0000)
committerDaniel Veillard <veillard@redhat.com>
Wed, 7 Dec 2005 13:45:20 +0000 (13:45 +0000)
  docs are installed and packaged in the -devel RPM
* docs/api.xsl docs/newapi.xsl: forgot to commit API HTML stylesheets
Daniel

ChangeLog
configure.in
docs/Makefile.am
docs/api.xsl [new file with mode: 0644]
docs/newapi.xsl [new file with mode: 0644]
libvir.spec.in

index 3760343c5c84164c5522f6848c87c2a897a1163f..d80e8a38d5e02f0cf2fb6c8f5df19c5c3d95901f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Dec  7 14:43:28 CET 2005 Daniel Veillard <veillard@redhat.com>
+
+       * configure.in libvir.spec.in docs/Makefile.am: make sure the
+         docs are installed and packaged in the -devel RPM
+       * docs/api.xsl docs/newapi.xsl: forgot to commit API HTML stylesheets
+
 Wed Dec  7 14:09:48 CET 2005 Karel Zak <kzak@redhat.com>
        * include/libvir.h src/libvir.c: adding xenConnectNumOfDomains()
          to returns number of active domains.
index b31a513e0c2fcdcca1ad722c59ca09204b81a4f6..30b12c0b76528cadf58b5d81f4a35c0f823be9f3 100644 (file)
@@ -50,6 +50,17 @@ test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
 
 AM_PROG_LIBTOOL
 
+dnl Specific dir for HTML output ?
+AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=path],
+            [path to base html directory, default $datadir/doc/html]),
+            [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])
+
+AC_ARG_WITH(html-subdir, AC_HELP_STRING([--with-html-subdir=path],
+            [directory used under html-dir, default $PACKAGE-$VERSION/html]),
+            [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"],
+            [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
+AC_SUBST(HTML_DIR)
+
 dnl
 dnl specific tests to setup DV devel environments with debug etc ...
 dnl
index f6c31a69e17f9f43cf14f34d9d9113e7c4c68b59..c5d7808e3c8864c88de28fe624814014df36877f 100644 (file)
@@ -57,19 +57,10 @@ maintainer-clean-local: clean-local
 
 rebuild: api all
 
-#install-data-local: 
-#      $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-#      -@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
-#      $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
-#      -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
-#      -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
-#      $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial
-#      -@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \
-#              $(DESTDIR)$(HTML_DIR)/tutorial
-#      $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial/images
-#      -@INSTALL@ -m 0644 $(srcdir)/tutorial/images/*.* \
-#              $(DESTDIR)$(HTML_DIR)/tutorial/images
-#      $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
-#      -@INSTALL@ -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
-#              $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
+install-data-local: 
+       $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
+       -@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html $(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
+       $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
+       -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
+       -@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
 
diff --git a/docs/api.xsl b/docs/api.xsl
new file mode 100644 (file)
index 0000000..b414f4e
--- /dev/null
@@ -0,0 +1,394 @@
+<?xml version="1.0"?>
+<!-- this stylesheet builds the API*.html , it works based on libvir-refs.xml
+  -->
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:exsl="http://exslt.org/common"
+  extension-element-prefixes="exsl"
+  exclude-result-prefixes="exsl">
+
+  <!-- Import the rest of the site stylesheets -->
+  <xsl:import href="site.xsl"/>
+
+  <!-- Generate XHTML-1.0 transitional -->
+  <xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+  <xsl:variable name="href_base" select="''"/>
+  <xsl:variable name="apirefs" select="document('libvir-refs.xml')"/>
+  <xsl:variable name="module" select="$apirefs/apirefs/@name"/>
+  <xsl:key name="refhref" match="reference" use="@name"/>
+
+  <xsl:template match="ref" mode="anchor">
+    <xsl:variable name="name" select="@name"/>
+    <xsl:for-each select="document('libvir-refs.xml')">
+       <a href="{key('refhref', $name)/@href}"><xsl:value-of select="$name"/></a><br/>
+    </xsl:for-each>
+  </xsl:template>
+  <xsl:template match="type" mode="reflist">
+    <h2>Type <xsl:value-of select="@name"/>:</h2>
+    <p>
+      <xsl:for-each select="ref">
+        <xsl:apply-templates mode="anchor" select="."/>
+       <xsl:text>
+</xsl:text>
+      </xsl:for-each>
+    </p>
+  </xsl:template>
+  <xsl:template match="letter" mode="reflist">
+    <h2>Letter <xsl:value-of select="@name"/>:</h2>
+    <p>
+      <xsl:for-each select="ref">
+        <xsl:apply-templates mode="anchor" select="."/>
+       <xsl:text>
+</xsl:text>
+      </xsl:for-each>
+    </p>
+  </xsl:template>
+  <xsl:template match="file" mode="reflist">
+    <h2><a name="{@name}">Module <xsl:value-of select="@name"/></a>:</h2>
+    <p>
+      <xsl:for-each select="ref">
+        <xsl:apply-templates mode="anchor" select="."/>
+       <xsl:text>
+</xsl:text>
+      </xsl:for-each>
+    </p>
+  </xsl:template>
+  <xsl:template match="letter" mode="wordlist">
+    <h2>Letter <xsl:value-of select="@name"/>:</h2>
+    <dl>
+      <xsl:for-each select="word">
+        <dt><xsl:value-of select="@name"/></dt>
+       <dd>
+       <xsl:for-each select="ref">
+         <xsl:apply-templates mode="anchor" select="."/>
+         <xsl:text>
+</xsl:text>
+       </xsl:for-each>
+       </dd>
+      </xsl:for-each>
+    </dl>
+  </xsl:template>
+
+  <xsl:template match="constructors">
+    <xsl:message>Generating API Constructors</xsl:message>
+    <xsl:variable name="title">List of constructors for <xsl:value-of select="$module"/></xsl:variable>
+    <xsl:document href="APIconstructors.html" method="xml" encoding="ISO-8859-1"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+      <html>
+        <head>
+        <xsl:call-template name="style"/>
+       <xsl:element name="title">
+         <xsl:value-of select="$title"/>
+       </xsl:element>
+        </head>
+        <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+          <xsl:call-template name="titlebox">
+           <xsl:with-param name="title" select="$title"/>
+         </xsl:call-template>
+          <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+            <tr>
+              <td bgcolor="#8b7765">
+                <table border="0" cellspacing="0" cellpadding="2" width="100%">
+                  <tr>
+                    <td valign="top" width="200" bgcolor="#8b7765">
+                      <xsl:call-template name="develtoc"/>
+                    </td>
+                    <td valign="top" bgcolor="#8b7765">
+                      <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                        <tr>
+                          <td>
+                            <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+                              <tr>
+                                <td>
+                                  <table border="0" cellpadding="3" cellspacing="1" width="100%">
+                                    <tr>
+                                      <td bgcolor="#fffacd">
+                                       <xsl:apply-templates mode="reflist" select="type"/>
+                                       <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+                                      </td>
+                                    </tr>
+                                  </table>
+                                </td>
+                              </tr>
+                            </table>
+                          </td>
+                        </tr>
+                      </table>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+            </tr>
+          </table>
+        </body>
+      </html>
+    </xsl:document>
+  </xsl:template>
+  <xsl:template match="files">
+    <xsl:message>Generating API List of synbols per file</xsl:message>
+    <xsl:variable name="title">List of Symbols per Module for <xsl:value-of select="$module"/></xsl:variable>
+    <xsl:document href="APIfiles.html" method="xml" encoding="ISO-8859-1"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+      <html>
+        <head>
+        <xsl:call-template name="style"/>
+       <xsl:element name="title">
+         <xsl:value-of select="$title"/>
+       </xsl:element>
+        </head>
+        <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+          <xsl:call-template name="titlebox">
+           <xsl:with-param name="title" select="$title"/>
+         </xsl:call-template>
+          <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+            <tr>
+              <td bgcolor="#8b7765">
+                <table border="0" cellspacing="0" cellpadding="2" width="100%">
+                  <tr>
+                    <td valign="top" width="200" bgcolor="#8b7765">
+                      <xsl:call-template name="develtoc"/>
+                    </td>
+                    <td valign="top" bgcolor="#8b7765">
+                      <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                        <tr>
+                          <td>
+                            <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+                              <tr>
+                                <td>
+                                  <table border="0" cellpadding="3" cellspacing="1" width="100%">
+                                    <tr>
+                                      <td bgcolor="#fffacd">
+                                       <xsl:apply-templates mode="reflist" select="file"/>
+                                       <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+                                      </td>
+                                    </tr>
+                                  </table>
+                                </td>
+                              </tr>
+                            </table>
+                          </td>
+                        </tr>
+                      </table>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+            </tr>
+          </table>
+        </body>
+      </html>
+    </xsl:document>
+  </xsl:template>
+  <xsl:template match="functions">
+    <xsl:message>Generating API Functions by Type</xsl:message>
+    <xsl:variable name="title">List of function manipulating types in <xsl:value-of select="$module"/></xsl:variable>
+    <xsl:document href="APIfunctions.html" method="xml" encoding="ISO-8859-1"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+      <html>
+        <head>
+        <xsl:call-template name="style"/>
+       <xsl:element name="title">
+         <xsl:value-of select="$title"/>
+       </xsl:element>
+        </head>
+        <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+          <xsl:call-template name="titlebox">
+           <xsl:with-param name="title" select="$title"/>
+         </xsl:call-template>
+          <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+            <tr>
+              <td bgcolor="#8b7765">
+                <table border="0" cellspacing="0" cellpadding="2" width="100%">
+                  <tr>
+                    <td valign="top" width="200" bgcolor="#8b7765">
+                      <xsl:call-template name="develtoc"/>
+                    </td>
+                    <td valign="top" bgcolor="#8b7765">
+                      <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                        <tr>
+                          <td>
+                            <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+                              <tr>
+                                <td>
+                                  <table border="0" cellpadding="3" cellspacing="1" width="100%">
+                                    <tr>
+                                      <td bgcolor="#fffacd">
+                                       <xsl:apply-templates mode="reflist" select="type"/>
+                                       <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+                                      </td>
+                                    </tr>
+                                  </table>
+                                </td>
+                              </tr>
+                            </table>
+                          </td>
+                        </tr>
+                      </table>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+            </tr>
+          </table>
+        </body>
+      </html>
+    </xsl:document>
+  </xsl:template>
+  <xsl:template match="alpha">
+    <xsl:message>Generating API Alphabetic list</xsl:message>
+    <xsl:variable name="title">Alphabetic List of Symbols in <xsl:value-of select="$module"/></xsl:variable>
+    <xsl:document href="APIsymbols.html" method="xml" encoding="ISO-8859-1"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+      <html>
+        <head>
+        <xsl:call-template name="style"/>
+       <xsl:element name="title">
+         <xsl:value-of select="$title"/>
+       </xsl:element>
+        </head>
+        <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+          <xsl:call-template name="titlebox">
+           <xsl:with-param name="title" select="$title"/>
+         </xsl:call-template>
+          <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+            <tr>
+              <td bgcolor="#8b7765">
+                <table border="0" cellspacing="0" cellpadding="2" width="100%">
+                  <tr>
+                    <td valign="top" width="200" bgcolor="#8b7765">
+                      <xsl:call-template name="develtoc"/>
+                    </td>
+                    <td valign="top" bgcolor="#8b7765">
+                      <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                        <tr>
+                          <td>
+                            <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+                              <tr>
+                                <td>
+                                  <table border="0" cellpadding="3" cellspacing="1" width="100%">
+                                    <tr>
+                                      <td bgcolor="#fffacd">
+                                       <xsl:apply-templates mode="reflist" select="letter"/>
+                                       <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+                                      </td>
+                                    </tr>
+                                  </table>
+                                </td>
+                              </tr>
+                            </table>
+                          </td>
+                        </tr>
+                      </table>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+            </tr>
+          </table>
+        </body>
+      </html>
+    </xsl:document>
+  </xsl:template>
+  <xsl:template name="apichunks">
+    <h2 align="center">
+    <xsl:for-each select="/apirefs/index/chunks/chunk">
+      <xsl:variable name="name" select="@name"/>
+      <xsl:variable name="start" select="@start"/>
+      <xsl:variable name="end" select="@end"/>
+      <xsl:variable name="block" select="concat($start, '-', $end)"/>
+      <a href="API{$name}.html"><xsl:value-of select="$block"/></a>
+      <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+    </h2>
+  </xsl:template>
+  <xsl:template match="chunk">
+    <xsl:variable name="name" select="@name"/>
+    <xsl:variable name="start" select="@start"/>
+    <xsl:variable name="end" select="@end"/>
+    <xsl:variable name="block" select="concat($start, '-', $end)"/>
+    <xsl:variable name="target" select="/apirefs/index/chunk[@name = $name]"/>
+    <xsl:variable name="title">API Alphabetic Index <xsl:value-of select="$block"/> for <xsl:value-of select="$module"/></xsl:variable>
+    <xsl:document href="API{$name}.html" method="xml" encoding="ISO-8859-1"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+      <html>
+        <head>
+        <xsl:call-template name="style"/>
+       <xsl:element name="title">
+         <xsl:value-of select="$title"/>
+       </xsl:element>
+        </head>
+        <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+          <xsl:call-template name="titlebox">
+           <xsl:with-param name="title" select="$title"/>
+         </xsl:call-template>
+          <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+            <tr>
+              <td bgcolor="#8b7765">
+                <table border="0" cellspacing="0" cellpadding="2" width="100%">
+                  <tr>
+                    <td valign="top" width="200" bgcolor="#8b7765">
+                      <xsl:call-template name="develtoc"/>
+                    </td>
+                    <td valign="top" bgcolor="#8b7765">
+                      <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                        <tr>
+                          <td>
+                            <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+                              <tr>
+                                <td>
+                                  <table border="0" cellpadding="3" cellspacing="1" width="100%">
+                                    <tr>
+                                      <td bgcolor="#fffacd">
+                                       <xsl:call-template name="apichunks"/>
+                                       <xsl:apply-templates mode="wordlist"
+                                                  select="$target/letter"/>
+                                       <xsl:call-template name="apichunks"/>
+                                       <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+                                      </td>
+                                    </tr>
+                                  </table>
+                                </td>
+                              </tr>
+                            </table>
+                          </td>
+                        </tr>
+                      </table>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+            </tr>
+          </table>
+        </body>
+      </html>
+    </xsl:document>
+  </xsl:template>
+
+  <xsl:template match="index">
+    <xsl:message>Generating API Index</xsl:message>
+    <xsl:apply-templates select="chunks/chunk"/>
+  </xsl:template>
+
+  <xsl:template match="apirefs">
+    <xsl:message>Generating API Cross References</xsl:message>
+    <xsl:apply-templates select="constructors"/>
+    <xsl:apply-templates select="functions"/>
+    <xsl:apply-templates select="alpha"/>
+    <xsl:apply-templates select="files"/>
+    <xsl:apply-templates select="index"/>
+  </xsl:template>
+
+  <xsl:template match="/">
+    <xsl:apply-templates select="$apirefs/apirefs"/>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/newapi.xsl b/docs/newapi.xsl
new file mode 100644 (file)
index 0000000..d6e3503
--- /dev/null
@@ -0,0 +1,756 @@
+<?xml version="1.0"?>
+<!--
+  Stylesheet to generate the HTML documentation from an XML API descriptions:
+  xsltproc newapi.xsl libvir-api.xml
+
+  Daniel Veillard
+-->
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:exsl="http://exslt.org/common"
+  xmlns:str="http://exslt.org/strings"
+  extension-element-prefixes="exsl str"
+  exclude-result-prefixes="exsl str">
+
+  <!-- Import the main part of the site stylesheets -->
+  <xsl:import href="site.xsl"/>
+
+  <!-- Generate XHTML-1.0 transitional -->
+  <xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+  <!-- Build keys for all symbols -->
+  <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
+
+  <!-- the target directory for the HTML output -->
+  <xsl:variable name="htmldir">html</xsl:variable>
+  <xsl:variable name="href_base">../</xsl:variable>
+
+  <!-- The table of content for the HTML API pages -->
+  <xsl:variable name="menu_name">API Menu</xsl:variable>
+  <xsl:variable name="apitoc">
+    <form action="../search.php"
+          enctype="application/x-www-form-urlencoded" method="get">
+      <input name="query" type="text" size="20" value=""/>
+      <input name="submit" type="submit" value="Search ..."/>
+    </form>
+    <ul><!-- style="margin-left: -1em" -->
+      <li><a style="font-weight:bold"
+             href="{$href_base}index.html">Main Menu</a></li>
+      <li><a style="font-weight:bold"
+             href="index.html">API Menu</a></li>
+      <li><a href="{$href_base}ChangeLog.html">ChangeLog</a></li>
+    </ul>
+  </xsl:variable>
+  <xsl:template name="apitoc">
+    <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+      <tr>
+        <td>
+          <table width="100%" border="0" cellspacing="1" cellpadding="3">
+            <tr>
+              <td colspan="1" bgcolor="#eecfa1" align="center">
+                <center>
+                  <b><xsl:value-of select="$menu_name"/></b>
+                </center>
+              </td>
+            </tr>
+            <tr>
+              <td bgcolor="#fffacd">
+                <xsl:copy-of select="$apitoc"/>
+              </td>
+            </tr>
+          </table>
+          <table width="100%" border="0" cellspacing="1" cellpadding="3">
+            <tr>
+              <td colspan="1" bgcolor="#eecfa1" align="center">
+                <center>
+                  <b>API Indexes</b>
+                </center>
+              </td>
+            </tr>
+            <tr>
+              <td bgcolor="#fffacd">
+                <xsl:copy-of select="$api"/>
+              </td>
+            </tr>
+          </table>
+          <table width="100%" border="0" cellspacing="1" cellpadding="3">
+            <tr>
+              <td colspan="1" bgcolor="#eecfa1" align="center">
+                <center>
+                  <b>Related links</b>
+                </center>
+              </td>
+            </tr>
+            <tr>
+              <td bgcolor="#fffacd">
+                <xsl:copy-of select="$related"/>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+    </table>
+  </xsl:template>
+
+  <xsl:template name="docstyle">
+    <style type="text/css">
+      div.deprecated pre.programlisting {border-style: double;border-color:red}
+      pre.programlisting {border-style: double;background: #EECFA1}
+    </style>
+  </xsl:template>
+  <xsl:template name="navbar">
+    <xsl:variable name="previous" select="preceding-sibling::file[1]"/>
+    <xsl:variable name="next" select="following-sibling::file[1]"/>
+    <table class="navigation" width="100%" summary="Navigation header"
+           cellpadding="2" cellspacing="2">
+      <tr valign="middle">
+        <xsl:if test="$previous">
+          <td><a accesskey="p" href="libxml-{$previous/@name}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td>
+         <th align="left"><a href="libxml-{$previous/@name}.html"><xsl:value-of select="$previous/@name"/></a></th>
+       </xsl:if>
+        <td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td>
+       <th align="left"><a href="index.html">API documentation</a></th>
+        <td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td>
+        <th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th>
+        <xsl:if test="$next">
+         <th align="right"><a href="libxml-{$next/@name}.html"><xsl:value-of select="$next/@name"/></a></th>
+          <td><a accesskey="n" href="libxml-{$next/@name}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td>
+        </xsl:if>
+      </tr>
+    </table>
+  </xsl:template>
+
+  <!-- This is convoluted but needed to force the current document to
+       be the API one and not the result tree from the tokenize() result,
+       because the keys are only defined on the main document -->
+  <xsl:template mode="dumptoken" match='*'>
+    <xsl:param name="token"/>
+    <xsl:variable name="ref" select="key('symbols', $token)"/>
+    <xsl:choose>
+      <xsl:when test="$ref">
+        <a href="libxml-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$token"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- dumps a string, making cross-reference links -->
+  <xsl:template name="dumptext">
+    <xsl:param name="text"/>
+    <xsl:variable name="ctxt" select='.'/>
+    <!-- <xsl:value-of select="$text"/> -->
+    <xsl:for-each select="str:tokenize($text, ' &#9;')">
+      <xsl:apply-templates select="$ctxt" mode='dumptoken'>
+        <xsl:with-param name="token" select="string(.)"/>
+      </xsl:apply-templates>
+      <xsl:if test="position() != last()">
+        <xsl:text> </xsl:text>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="macro" mode="toc">
+    <pre class="programlisting">
+    <xsl:text>#define </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a>
+    </pre>
+  </xsl:template>
+
+  <xsl:template match="variable" mode="toc">
+    <pre class="programlisting">
+    <xsl:text>Variable </xsl:text>
+    <xsl:call-template name="dumptext">
+      <xsl:with-param name="text" select="string(@type)"/>
+    </xsl:call-template>
+    <xsl:text> </xsl:text>
+    <a name="{@name}"></a>
+    <xsl:value-of select="@name"/>
+    <xsl:text>
+
+</xsl:text>
+    </pre>
+  </xsl:template>
+
+  <xsl:template match="typedef" mode="toc">
+    <xsl:variable name="name" select="string(@name)"/>
+    <pre class="programlisting">
+    <xsl:choose>
+      <xsl:when test="@type = 'enum'">
+       <xsl:text>Enum </xsl:text>
+       <a href="#{$name}"><xsl:value-of select="$name"/></a>
+       <xsl:text>
+</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+       <xsl:text>Typedef </xsl:text>
+       <xsl:call-template name="dumptext">
+         <xsl:with-param name="text" select="@type"/>
+       </xsl:call-template>
+       <xsl:text> </xsl:text>
+       <a name="{$name}"><xsl:value-of select="$name"/></a>
+       <xsl:text>
+</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+    </pre>
+  </xsl:template>
+
+  <xsl:template match="typedef[@type = 'enum']">
+    <xsl:variable name="name" select="string(@name)"/>
+    <h3>Enum <a name="{$name}"><xsl:value-of select="$name"/></a></h3>
+    <pre class="programlisting">
+      <xsl:text>Enum </xsl:text>
+      <xsl:value-of select="$name"/>
+      <xsl:text> {
+</xsl:text>
+      <xsl:for-each select="/api/symbols/enum[@type = $name]">
+        <xsl:sort select="@value" data-type="number" order="ascending"/>
+        <xsl:text>    </xsl:text>
+        <a name="{@name}"><xsl:value-of select="@name"/></a>
+        <xsl:text> = </xsl:text>
+        <xsl:value-of select="@value"/>
+        <xsl:if test="@info != ''">
+         <xsl:text> : </xsl:text>
+         <xsl:call-template name="dumptext">
+           <xsl:with-param name="text" select="@info"/>
+         </xsl:call-template>
+        </xsl:if>
+        <xsl:text>
+</xsl:text>
+      </xsl:for-each>
+      <xsl:text>}
+</xsl:text>
+    </pre>
+  </xsl:template>
+
+  <xsl:template match="struct" mode="toc">
+    <pre class="programlisting">
+    <xsl:text>Structure </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a><br/>
+    <xsl:value-of select="@type"/><xsl:text>
+</xsl:text>
+    <xsl:if test="not(field)">
+      <xsl:text>The content of this structure is not made public by the API.
+</xsl:text>
+    </xsl:if>
+    </pre>
+  </xsl:template>
+
+  <xsl:template match="struct">
+    <h3><a name="{@name}">Structure <xsl:value-of select="@name"/></a></h3>
+    <pre class="programlisting">
+    <xsl:text>Structure </xsl:text><xsl:value-of select="@name"/><br/>
+    <xsl:value-of select="@type"/><xsl:text> {
+</xsl:text>
+    <xsl:if test="not(field)">
+      <xsl:text>The content of this structure is not made public by the API.
+</xsl:text>
+    </xsl:if>
+    <xsl:for-each select="field">
+        <xsl:text>    </xsl:text>
+       <xsl:call-template name="dumptext">
+         <xsl:with-param name="text" select="@type"/>
+       </xsl:call-template>
+       <xsl:text>&#9;</xsl:text>
+       <xsl:value-of select="@name"/>
+       <xsl:if test="@info != ''">
+         <xsl:text>&#9;: </xsl:text>
+         <xsl:call-template name="dumptext">
+           <xsl:with-param name="text" select="substring(@info, 1, 40)"/>
+         </xsl:call-template>
+       </xsl:if>
+       <xsl:text>
+</xsl:text>
+    </xsl:for-each>
+    <xsl:text>}</xsl:text>
+    </pre>
+  </xsl:template>
+
+  <xsl:template match="macro">
+    <xsl:variable name="name" select="string(@name)"/>
+    <h3><a name="{$name}"></a>Macro: <xsl:value-of select="$name"/></h3>
+    <pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre>
+    <p>
+    <xsl:call-template name="dumptext">
+      <xsl:with-param name="text" select="info"/>
+    </xsl:call-template>
+    </p><xsl:text>
+</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="function" mode="toc">
+    <xsl:variable name="name" select="string(@name)"/>
+    <xsl:variable name="nlen" select="string-length($name)"/>
+    <xsl:variable name="tlen" select="string-length(return/@type)"/>
+    <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+    <pre class="programlisting">
+    <xsl:call-template name="dumptext">
+      <xsl:with-param name="text" select="return/@type"/>
+    </xsl:call-template>
+    <xsl:text>&#9;</xsl:text>
+    <a href="#{@name}"><xsl:value-of select="@name"/></a>
+    <xsl:if test="$blen - 40 &lt; -8">
+      <xsl:text>&#9;</xsl:text>
+    </xsl:if>
+    <xsl:if test="$blen - 40 &lt; 0">
+      <xsl:text>&#9;</xsl:text>
+    </xsl:if>
+    <xsl:text>&#9;(</xsl:text>
+    <xsl:if test="not(arg)">
+      <xsl:text>void</xsl:text>
+    </xsl:if>
+    <xsl:for-each select="arg">
+      <xsl:call-template name="dumptext">
+        <xsl:with-param name="text" select="@type"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="@name"/>
+      <xsl:if test="position() != last()">
+        <xsl:text>, </xsl:text><br/>
+       <xsl:if test="$blen - 40 &gt; 8">
+         <xsl:text>&#9;</xsl:text>
+       </xsl:if>
+       <xsl:if test="$blen - 40 &gt; 0">
+         <xsl:text>&#9;</xsl:text>
+       </xsl:if>
+       <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+      </xsl:if>
+    </xsl:for-each>
+    <xsl:text>)</xsl:text>
+    </pre><xsl:text>
+</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="functype" mode="toc">
+    <xsl:variable name="name" select="string(@name)"/>
+    <xsl:variable name="nlen" select="string-length($name)"/>
+    <xsl:variable name="tlen" select="string-length(return/@type)"/>
+    <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+    <pre class="programlisting">
+    <xsl:text>Function type: </xsl:text>
+    <a href="#{$name}"><xsl:value-of select="$name"/></a>
+    <xsl:text>
+</xsl:text>
+    <xsl:call-template name="dumptext">
+      <xsl:with-param name="text" select="return/@type"/>
+    </xsl:call-template>
+    <xsl:text>&#9;</xsl:text>
+    <a href="#{$name}"><xsl:value-of select="$name"/></a>
+    <xsl:if test="$blen - 40 &lt; -8">
+      <xsl:text>&#9;</xsl:text>
+    </xsl:if>
+    <xsl:if test="$blen - 40 &lt; 0">
+      <xsl:text>&#9;</xsl:text>
+    </xsl:if>
+    <xsl:text>&#9;(</xsl:text>
+    <xsl:if test="not(arg)">
+      <xsl:text>void</xsl:text>
+    </xsl:if>
+    <xsl:for-each select="arg">
+      <xsl:call-template name="dumptext">
+        <xsl:with-param name="text" select="@type"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="@name"/>
+      <xsl:if test="position() != last()">
+        <xsl:text>, </xsl:text><br/>
+       <xsl:if test="$blen - 40 &gt; 8">
+         <xsl:text>&#9;</xsl:text>
+       </xsl:if>
+       <xsl:if test="$blen - 40 &gt; 0">
+         <xsl:text>&#9;</xsl:text>
+       </xsl:if>
+       <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+      </xsl:if>
+    </xsl:for-each>
+    <xsl:text>)
+</xsl:text>
+    </pre>
+    <xsl:text>
+</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="functype">
+    <xsl:variable name="name" select="string(@name)"/>
+    <xsl:variable name="nlen" select="string-length($name)"/>
+    <xsl:variable name="tlen" select="string-length(return/@type)"/>
+    <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+    <h3>
+      <a name="{$name}"></a>
+      <xsl:text>Function type: </xsl:text>
+      <xsl:value-of select="$name"/>
+    </h3>
+    <pre class="programlisting">
+    <xsl:text>Function type: </xsl:text>
+    <xsl:value-of select="$name"/>
+    <xsl:text>
+</xsl:text>
+    <xsl:call-template name="dumptext">
+      <xsl:with-param name="text" select="return/@type"/>
+    </xsl:call-template>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:value-of select="@name"/>
+    <xsl:if test="$blen - 40 &lt; -8">
+      <xsl:text>&#9;</xsl:text>
+    </xsl:if>
+    <xsl:if test="$blen - 40 &lt; 0">
+      <xsl:text>&#9;</xsl:text>
+    </xsl:if>
+    <xsl:text>&#9;(</xsl:text>
+    <xsl:if test="not(arg)">
+      <xsl:text>void</xsl:text>
+    </xsl:if>
+    <xsl:for-each select="arg">
+      <xsl:call-template name="dumptext">
+        <xsl:with-param name="text" select="@type"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="@name"/>
+      <xsl:if test="position() != last()">
+        <xsl:text>, </xsl:text><br/>
+       <xsl:if test="$blen - 40 &gt; 8">
+         <xsl:text>&#9;</xsl:text>
+       </xsl:if>
+       <xsl:if test="$blen - 40 &gt; 0">
+         <xsl:text>&#9;</xsl:text>
+       </xsl:if>
+       <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+      </xsl:if>
+    </xsl:for-each>
+    <xsl:text>)
+</xsl:text>
+    </pre>
+    <p>
+    <xsl:call-template name="dumptext">
+      <xsl:with-param name="text" select="info"/>
+    </xsl:call-template>
+    </p>
+    <xsl:if test="arg | return">
+      <div class="variablelist"><table border="0"><col align="left"/><tbody>
+      <xsl:for-each select="arg">
+        <tr>
+          <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+         <td>
+           <xsl:call-template name="dumptext">
+             <xsl:with-param name="text" select="@info"/>
+           </xsl:call-template>
+         </td>
+        </tr>
+      </xsl:for-each>
+      <xsl:if test="return/@info">
+        <tr>
+          <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
+         <td>
+           <xsl:call-template name="dumptext">
+             <xsl:with-param name="text" select="return/@info"/>
+           </xsl:call-template>
+         </td>
+        </tr>
+      </xsl:if>
+      </tbody></table></div>
+    </xsl:if>
+    <br/>
+    <xsl:text>
+</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="function">
+    <xsl:variable name="name" select="string(@name)"/>
+    <xsl:variable name="nlen" select="string-length($name)"/>
+    <xsl:variable name="tlen" select="string-length(return/@type)"/>
+    <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+    <h3><a name="{$name}"></a>Function: <xsl:value-of select="$name"/></h3>
+    <pre class="programlisting">
+    <xsl:call-template name="dumptext">
+      <xsl:with-param name="text" select="return/@type"/>
+    </xsl:call-template>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:value-of select="@name"/>
+    <xsl:if test="$blen - 40 &lt; -8">
+      <xsl:text>&#9;</xsl:text>
+    </xsl:if>
+    <xsl:if test="$blen - 40 &lt; 0">
+      <xsl:text>&#9;</xsl:text>
+    </xsl:if>
+    <xsl:text>&#9;(</xsl:text>
+    <xsl:if test="not(arg)">
+      <xsl:text>void</xsl:text>
+    </xsl:if>
+    <xsl:for-each select="arg">
+      <xsl:call-template name="dumptext">
+        <xsl:with-param name="text" select="@type"/>
+      </xsl:call-template>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="@name"/>
+      <xsl:if test="position() != last()">
+        <xsl:text>, </xsl:text><br/>
+       <xsl:if test="$blen - 40 &gt; 8">
+         <xsl:text>&#9;</xsl:text>
+       </xsl:if>
+       <xsl:if test="$blen - 40 &gt; 0">
+         <xsl:text>&#9;</xsl:text>
+       </xsl:if>
+       <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+      </xsl:if>
+    </xsl:for-each>
+    <xsl:text>)</xsl:text><br/>
+    <xsl:text>
+</xsl:text>
+    </pre>
+    <p>
+    <xsl:call-template name="dumptext">
+      <xsl:with-param name="text" select="info"/>
+    </xsl:call-template>
+    </p><xsl:text>
+</xsl:text>
+    <xsl:if test="arg | return/@info">
+      <div class="variablelist"><table border="0"><col align="left"/><tbody>
+      <xsl:for-each select="arg">
+        <tr>
+          <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+         <td>
+           <xsl:call-template name="dumptext">
+             <xsl:with-param name="text" select="@info"/>
+           </xsl:call-template>
+         </td>
+        </tr>
+      </xsl:for-each>
+      <xsl:if test="return/@info">
+        <tr>
+          <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
+         <td>
+           <xsl:call-template name="dumptext">
+             <xsl:with-param name="text" select="return/@info"/>
+           </xsl:call-template>
+         </td>
+        </tr>
+      </xsl:if>
+      </tbody></table></div>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="exports" mode="toc">
+    <xsl:apply-templates select="key('symbols', string(@symbol))[1]" mode="toc"/>
+  </xsl:template>
+
+  <xsl:template match="exports">
+    <xsl:apply-templates select="key('symbols', string(@symbol))[1]"/>
+  </xsl:template>
+
+  <xsl:template name="description">
+    <xsl:if test="deprecated">
+      <h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2>
+    </xsl:if>
+    <xsl:if test="description">
+      <p><xsl:value-of select="description"/></p>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template name="docomponents">
+    <xsl:param name="mode"/>
+    <xsl:apply-templates select="exports[@type='macro']" mode="$mode">
+      <xsl:sort select='@symbol'/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="exports[@type='enum']" mode="$mode">
+      <xsl:sort select='@symbol'/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="exports[@type='typedef']" mode="$mode">
+      <xsl:sort select='@symbol'/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="exports[@type='struct']" mode="$mode">
+      <xsl:sort select='@symbol'/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="exports[@type='function']" mode="$mode">
+      <xsl:sort select='@symbol'/>
+    </xsl:apply-templates>
+  </xsl:template>
+  
+  <xsl:template match="file">
+    <xsl:variable name="name" select="@name"/>
+    <xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable>
+    <xsl:document href="{$htmldir}/libxml-{$name}.html" method="xml" encoding="ISO-8859-1"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+       <html>
+         <head>
+           <xsl:call-template name="style"/>
+           <xsl:call-template name="docstyle"/>
+           <title><xsl:value-of select="$title"/></title>
+         </head>
+         <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+           <xsl:call-template name="titlebox">
+             <xsl:with-param name="title" select="$title"/>
+           </xsl:call-template>
+         <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+           <tr>
+             <td bgcolor="#8b7765">
+               <table border="0" cellspacing="0" cellpadding="2" width="100%">
+                 <tr>
+                   <td valign="top" width="200" bgcolor="#8b7765">
+                     <xsl:call-template name="apitoc"/>
+                   </td>
+                   <td valign="top" bgcolor="#8b7765">
+                     <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                       <tr>
+                         <td>
+                           <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+                             <tr>
+                               <td>
+                                 <table border="0" cellpadding="3" cellspacing="1" width="100%">
+                                   <tr>
+                                     <td bgcolor="#fffacd">
+           <xsl:call-template name="navbar"/>
+           <xsl:call-template name="description"/>
+           <xsl:choose>
+             <xsl:when test="deprecated">
+               <div class="deprecated">
+                 <h2>Table of Contents</h2>
+                 <xsl:apply-templates select="exports" mode="toc"/>
+                 <h2>Description</h2>
+                 <xsl:text>
+</xsl:text>
+                 <xsl:apply-templates select="exports"/>
+               </div>
+             </xsl:when>
+             <xsl:otherwise>
+               <h2>Table of Contents</h2>
+               <xsl:apply-templates select="exports[@type='macro']" mode="toc">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="exports[@type='enum']" mode="toc">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="exports[@type='typedef']" mode="toc">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="exports[@type='struct']" mode="toc">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="exports[@type='function']" mode="toc">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <h2>Description</h2>
+               <xsl:text>
+</xsl:text>
+               <xsl:apply-templates select="exports[@type='macro']">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="exports[@type='enum']">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="exports[@type='typedef']">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="exports[@type='struct']">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="exports[@type='function']">
+                 <xsl:sort select='@symbol'/>
+               </xsl:apply-templates>
+             </xsl:otherwise>
+           </xsl:choose>
+                                       <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+                                     </td>
+                                   </tr>
+                                 </table>
+                               </td>
+                             </tr>
+                           </table>
+                         </td>
+                       </tr>
+                     </table>
+                   </td>
+                 </tr>
+               </table>
+             </td>
+           </tr>
+         </table>
+         </body>
+       </html>
+    </xsl:document>
+  </xsl:template>
+
+  <xsl:template match="file" mode="toc">
+    <xsl:variable name="name" select="@name"/>
+    <li>
+      <a href="libxml-{$name}.html"><xsl:value-of select="$name"/></a>
+      <xsl:text>: </xsl:text>
+      <xsl:value-of select="summary"/>
+    </li>
+  </xsl:template>
+
+  <xsl:template name="mainpage">
+    <xsl:param name="file" select="concat($htmldir, '/index.html')"/>
+    <xsl:variable name="title">Reference Manual for <xsl:value-of select="/api/@name"/></xsl:variable>
+    <xsl:document href="{$file}" method="xml" encoding="ISO-8859-1"
+      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+       <html>
+         <head>
+           <xsl:call-template name="style"/>
+           <xsl:call-template name="docstyle"/>
+           <title><xsl:value-of select="$title"/></title>
+         </head>
+         <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+           <xsl:call-template name="titlebox">
+             <xsl:with-param name="title" select="$title"/>
+           </xsl:call-template>
+         <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+           <tr>
+             <td bgcolor="#8b7765">
+               <table border="0" cellspacing="0" cellpadding="2" width="100%">
+                 <tr>
+                   <td valign="top" width="200" bgcolor="#8b7765">
+                     <xsl:call-template name="apitoc"/>
+                   </td>
+                   <td valign="top" bgcolor="#8b7765">
+                     <table border="0" cellspacing="0" cellpadding="1" width="100%">
+                       <tr>
+                         <td>
+                           <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+                             <tr>
+                               <td>
+                                 <table border="0" cellpadding="3" cellspacing="1" width="100%">
+                                   <tr>
+                                     <td bgcolor="#fffacd">
+           <h2>Table of Contents</h2>
+           <ul>
+           <xsl:apply-templates select="/api/files/file" mode="toc"/>
+           </ul>
+                                       <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+                                     </td>
+                                   </tr>
+                                 </table>
+                               </td>
+                             </tr>
+                           </table>
+                         </td>
+                       </tr>
+                     </table>
+                   </td>
+                 </tr>
+               </table>
+             </td>
+           </tr>
+         </table>
+         </body>
+       </html>
+    </xsl:document>
+  </xsl:template>
+
+  <xsl:template match="/">
+    <!-- Save the main index.html as well as a couple of copies -->
+    <xsl:call-template name="mainpage"/>
+    <xsl:call-template name="mainpage">
+      <xsl:with-param name="file" select="concat($htmldir, '/book1.html')"/>
+    </xsl:call-template>
+    <xsl:call-template name="mainpage">
+      <xsl:with-param name="file" select="concat($htmldir, '/libxml-lib.html')"/>
+    </xsl:call-template>
+    <!-- now build the file for each of the modules -->
+    <xsl:apply-templates select="/api/files/file"/>
+  </xsl:template>
+
+</xsl:stylesheet>
index 9c6a397a572374f9cab6554c2f8fac9683bf2a26..74edfce53a4592ba113292a893ade1ac4edd3926 100644 (file)
@@ -6,7 +6,7 @@ License: LGPL
 Group: Development/Libraries
 Source: libvir-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-URL: http://www.gnome.org/~veillard/gamin/
+URL: http://libvir.org/
 BuildRequires: xen
 Requires: xen
 
@@ -57,6 +57,9 @@ rm -fr %{buildroot}
 %{_includedir}/libvir/*.h
 %{_libdir}/pkgconfig/libvir.pc
 
+%doc docs/*.html docs/html docs/*.gif
+%doc docs/libvir-api.xml
+
 %changelog
 * Wed Nov  2 2005 Daniel Veillard <veillard@redhat.com> 0.0.1-1
 - created