summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am1
-rw-r--r--tools/Makefile.in418
-rw-r--r--tools/doc-generator.xsl691
3 files changed, 1110 insertions, 0 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
new file mode 100644
index 00000000..17dc6146
--- /dev/null
+++ b/tools/Makefile.am
@@ -0,0 +1 @@
+EXTRA_DIST = doc-generator.xsl
diff --git a/tools/Makefile.in b/tools/Makefile.in
new file mode 100644
index 00000000..307cf2c7
--- /dev/null
+++ b/tools/Makefile.in
@@ -0,0 +1,418 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \
+	$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \
+	$(top_srcdir)/m4/libnl-check.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DHCLIENT_PATH = @DHCLIENT_PATH@
+DHCPCD_PATH = @DHCPCD_PATH@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTKDOC_MKPDF = @GTKDOC_MKPDF@
+GTKDOC_REBASE = @GTKDOC_REBASE@
+GUDEV_CFLAGS = @GUDEV_CFLAGS@
+GUDEV_LIBS = @GUDEV_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+IPTABLES_PATH = @IPTABLES_PATH@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDL = @LIBDL@
+LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
+LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
+LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
+LIBM = @LIBM@
+LIBNL_CFLAGS = @LIBNL_CFLAGS@
+LIBNL_LIBS = @LIBNL_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@
+RANLIB = @RANLIB@
+RESOLVCONF_PATH = @RESOLVCONF_PATH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYSTEM_CA_PATH = @SYSTEM_CA_PATH@
+UDEV_BASE_DIR = @UDEV_BASE_DIR@
+USE_NLS = @USE_NLS@
+UUID_CFLAGS = @UUID_CFLAGS@
+UUID_LIBS = @UUID_LIBS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = doc-generator.xsl
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tools/doc-generator.xsl b/tools/doc-generator.xsl
new file mode 100644
index 00000000..bcc88e83
--- /dev/null
+++ b/tools/doc-generator.xsl
@@ -0,0 +1,691 @@
+<!-- Generate HTML documentation from the Telepathy specification.
+The master copy of this stylesheet is in the Telepathy spec repository -
+please make any changes there.
+
+Copyright (C) 2006, 2007 Collabora Limited
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
+  exclude-result-prefixes="tp">
+  <!--Don't move the declaration of the HTML namespace up here - XMLNSs
+  don't work ideally in the presence of two things that want to use the
+  absence of a prefix, sadly. -->
+
+  <xsl:template match="*" mode="identity">
+    <xsl:copy>
+      <xsl:apply-templates mode="identity"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="tp:docstring">
+    <xsl:apply-templates select="node()" mode="identity"/>
+  </xsl:template>
+
+  <xsl:template match="tp:errors">
+    <h1 xmlns="http://www.w3.org/1999/xhtml">Errors:</h1>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="tp:generic-types">
+    <h1 xmlns="http://www.w3.org/1999/xhtml">Generic types:</h1>
+    <xsl:call-template name="do-types"/>
+  </xsl:template>
+
+  <xsl:template name="do-types">
+    <xsl:if test="tp:simple-type">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Simple types:</h2>
+      <xsl:apply-templates select="tp:simple-type"/>
+    </xsl:if>
+
+    <xsl:if test="tp:enum">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Enumerated types:</h2>
+      <xsl:apply-templates select="tp:enum"/>
+    </xsl:if>
+
+    <xsl:if test="tp:flags">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Sets of flags:</h2>
+      <xsl:apply-templates select="tp:flags"/>
+    </xsl:if>
+
+    <xsl:if test="tp:struct">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Structure types:</h2>
+      <xsl:apply-templates select="tp:struct"/>
+    </xsl:if>
+
+    <xsl:if test="tp:mapping">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Mapping types:</h2>
+      <xsl:apply-templates select="tp:mapping"/>
+    </xsl:if>
+
+    <xsl:if test="tp:external-type">
+      <h2 xmlns="http://www.w3.org/1999/xhtml">Types defined elsewhere:</h2>
+      <dl><xsl:apply-templates select="tp:external-type"/></dl>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="tp:error">
+    <h2 xmlns="http://www.w3.org/1999/xhtml"><a name="{concat(../@namespace, '.', translate(@name, ' ', ''))}"></a><xsl:value-of select="concat(../@namespace, '.', translate(@name, ' ', ''))"/></h2>
+    <xsl:apply-templates select="tp:docstring"/>
+  </xsl:template>
+
+  <xsl:template match="/tp:spec/tp:copyright">
+    <div xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates/>
+    </div>
+  </xsl:template>
+  <xsl:template match="/tp:spec/tp:license">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="license">
+      <xsl:apply-templates mode="identity"/>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:copyright"/>
+  <xsl:template match="tp:license"/>
+
+  <xsl:template match="interface">
+    <h1 xmlns="http://www.w3.org/1999/xhtml"><a name="{@name}"></a><xsl:value-of select="@name"/></h1>
+
+    <xsl:if test="@tp:causes-havoc">
+      <p xmlns="http://www.w3.org/1999/xhtml" class="causes-havoc">
+        This interface is <xsl:value-of select="@tp:causes-havoc"/>
+        and is likely to cause havoc to your API/ABI if bindings are generated.
+        Don't include it in libraries that care about compatibility.
+      </p>
+    </xsl:if>
+
+    <xsl:if test="tp:requires">
+      <p>Implementations of this interface must also implement:</p>
+      <ul xmlns="http://www.w3.org/1999/xhtml">
+        <xsl:for-each select="tp:requires">
+          <li><code><a href="#{@interface}"><xsl:value-of select="@interface"/></a></code></li>
+        </xsl:for-each>
+      </ul>
+    </xsl:if>
+
+    <xsl:apply-templates select="tp:docstring" />
+
+    <xsl:choose>
+      <xsl:when test="method">
+        <h2 xmlns="http://www.w3.org/1999/xhtml">Methods:</h2>
+        <xsl:apply-templates select="method"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no methods.</p>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="signal">
+        <h2 xmlns="http://www.w3.org/1999/xhtml">Signals:</h2>
+        <xsl:apply-templates select="signal"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no signals.</p>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:choose>
+      <xsl:when test="property">
+        <h2 xmlns="http://www.w3.org/1999/xhtml">Properties:</h2>
+        <dl xmlns="http://www.w3.org/1999/xhtml">
+          <xsl:apply-templates select="property"/>
+        </dl>
+      </xsl:when>
+      <xsl:otherwise>
+        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no properties.</p>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:call-template name="do-types"/>
+
+  </xsl:template>
+
+  <xsl:template match="tp:flags">
+    <h3>
+      <a name="type-{@name}">
+        <xsl:value-of select="@name"/>
+      </a>
+    </h3>
+    <xsl:apply-templates select="tp:docstring" />
+    <dl xmlns="http://www.w3.org/1999/xhtml">
+        <xsl:variable name="value-prefix">
+          <xsl:choose>
+            <xsl:when test="@value-prefix">
+              <xsl:value-of select="@value-prefix"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="@name"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+      <xsl:for-each select="tp:flag">
+        <dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
+        <xsl:choose>
+          <xsl:when test="tp:docstring">
+            <dd xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates select="tp:docstring" /></dd>
+          </xsl:when>
+          <xsl:otherwise>
+            <dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </dl>
+  </xsl:template>
+
+  <xsl:template match="tp:enum">
+    <h3 xmlns="http://www.w3.org/1999/xhtml">
+      <a name="type-{@name}">
+        <xsl:value-of select="@name"/>
+      </a>
+    </h3>
+    <xsl:apply-templates select="tp:docstring" />
+    <dl xmlns="http://www.w3.org/1999/xhtml">
+        <xsl:variable name="value-prefix">
+          <xsl:choose>
+            <xsl:when test="@value-prefix">
+              <xsl:value-of select="@value-prefix"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="@name"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+      <xsl:for-each select="tp:enumvalue">
+        <dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
+        <xsl:choose>
+          <xsl:when test="tp:docstring">
+            <dd xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates select="tp:docstring" /></dd>
+          </xsl:when>
+          <xsl:otherwise>
+            <dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </dl>
+  </xsl:template>
+
+  <xsl:template match="property">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:if test="@name">
+        <code><xsl:value-of select="@name"/></code> -
+      </xsl:if>
+      <code><xsl:value-of select="@type"/></code> -
+      <code>(<xsl:value-of select="@access"/>)</code>
+      <xsl:call-template name="parenthesized-tp-type"/>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates select="tp:docstring"/>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="tp:mapping">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="struct">
+      <h3>
+        <a name="type-{@name}">
+          <xsl:value-of select="@name"/>
+        </a> - a{
+        <xsl:for-each select="tp:member">
+          <xsl:value-of select="@type"/>
+          <xsl:text>: </xsl:text>
+          <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()"> &#x2192; </xsl:if>
+        </xsl:for-each>
+        }
+      </h3>
+      <div class="docstring">
+        <xsl:apply-templates select="tp:docstring"/>
+      </div>
+      <div>
+        <h4>Members</h4>
+        <dl>
+          <xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
+        </dl>
+      </div>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:docstring" mode="in-index"/>
+
+  <xsl:template match="tp:simple-type | tp:enum | tp:flags | tp:external-type"
+    mode="in-index">
+    - <xsl:value-of select="@type"/>
+  </xsl:template>
+
+  <xsl:template match="tp:simple-type">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="simple-type">
+      <h3>
+        <a name="type-{@name}">
+          <xsl:value-of select="@name"/>
+        </a> - <xsl:value-of select="@type"/>
+      </h3>
+      <div class="docstring">
+        <xsl:apply-templates select="tp:docstring"/>
+      </div>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:external-type">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="external-type">
+      <dt>
+        <a name="type-{@name}">
+          <xsl:value-of select="@name"/>
+        </a> - <xsl:value-of select="@type"/>
+      </dt>
+      <dd>Defined by: <xsl:value-of select="@from"/></dd>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="tp:struct" mode="in-index">
+    - ( <xsl:for-each select="tp:member">
+          <xsl:value-of select="@type"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each> )
+  </xsl:template>
+
+  <xsl:template match="tp:mapping" mode="in-index">
+    - a{ <xsl:for-each select="tp:member">
+          <xsl:value-of select="@type"/>
+          <xsl:if test="position() != last()"> &#x2192; </xsl:if>
+        </xsl:for-each> }
+  </xsl:template>
+
+  <xsl:template match="tp:struct">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="struct">
+      <h3>
+        <a name="type-{@name}">
+          <xsl:value-of select="@name"/>
+        </a> - (
+        <xsl:for-each select="tp:member">
+          <xsl:value-of select="@type"/>
+          <xsl:text>: </xsl:text>
+          <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+        )
+      </h3>
+      <div class="docstring">
+        <xsl:apply-templates select="tp:docstring"/>
+      </div>
+      <xsl:choose>
+        <xsl:when test="string(@array-name) != ''">
+          <p>In bindings that need a separate name, arrays of
+            <xsl:value-of select="@name"/> should be called
+            <xsl:value-of select="@array-name"/>.</p>
+        </xsl:when>
+        <xsl:otherwise>
+          <p>Arrays of <xsl:value-of select="@name"/> don't generally
+            make sense.</p>
+        </xsl:otherwise>
+      </xsl:choose>
+      <div>
+        <h4>Members</h4>
+        <dl>
+          <xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
+        </dl>
+      </div>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="method">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="method">
+      <h3 xmlns="http://www.w3.org/1999/xhtml">
+        <a name="{concat(../@name, concat('.', @name))}">
+          <xsl:value-of select="@name"/>
+        </a> (
+        <xsl:for-each xmlns="" select="arg[@direction='in']">
+          <xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+        ) &#x2192;
+        <xsl:choose>
+          <xsl:when test="arg[@direction='out']">
+            <xsl:for-each xmlns="" select="arg[@direction='out']">
+              <xsl:value-of select="@type"/>
+              <xsl:if test="position() != last()">, </xsl:if>
+            </xsl:for-each>
+          </xsl:when>
+          <xsl:otherwise>nothing</xsl:otherwise>
+        </xsl:choose>
+      </h3>
+      <div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
+        <xsl:apply-templates select="tp:docstring" />
+      </div>
+
+      <xsl:if test="arg[@direction='in']">
+        <div xmlns="http://www.w3.org/1999/xhtml">
+          <h4>Parameters</h4>
+          <dl xmlns="http://www.w3.org/1999/xhtml">
+            <xsl:apply-templates select="arg[@direction='in']"
+              mode="parameters-in-docstring"/>
+          </dl>
+        </div>
+      </xsl:if>
+
+      <xsl:if test="arg[@direction='out']">
+        <div xmlns="http://www.w3.org/1999/xhtml">
+          <h4>Returns</h4>
+          <dl xmlns="http://www.w3.org/1999/xhtml">
+            <xsl:apply-templates select="arg[@direction='out']"
+              mode="returns-in-docstring"/>
+          </dl>
+        </div>
+      </xsl:if>
+
+      <xsl:if test="tp:possible-errors">
+        <div xmlns="http://www.w3.org/1999/xhtml">
+          <h4>Possible errors</h4>
+          <dl xmlns="http://www.w3.org/1999/xhtml">
+            <xsl:apply-templates select="tp:possible-errors/tp:error"/>
+          </dl>
+        </div>
+      </xsl:if>
+
+    </div>
+  </xsl:template>
+
+  <xsl:template name="parenthesized-tp-type">
+    <xsl:if test="@tp:type">
+      <xsl:variable name="tp-type" select="@tp:type"/>
+      <xsl:variable name="single-type">
+        <xsl:choose>
+          <xsl:when test="contains($tp-type, '[]')">
+            <xsl:value-of select="substring-before($tp-type, '[]')"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$tp-type"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:choose>
+        <xsl:when test="//tp:simple-type[@name=$tp-type]" />
+        <xsl:when test="//tp:simple-type[concat(@name, '[]')=$tp-type]" />
+        <xsl:when test="//tp:struct[concat(@name, '[]')=$tp-type][string(@array-name) != '']" />
+        <xsl:when test="//tp:struct[@name=$tp-type]" />
+        <xsl:when test="//tp:enum[@name=$tp-type]" />
+        <xsl:when test="//tp:enum[concat(@name, '[]')=$tp-type]" />
+        <xsl:when test="//tp:flags[@name=$tp-type]" />
+        <xsl:when test="//tp:flags[concat(@name, '[]')=$tp-type]" />
+        <xsl:when test="//tp:mapping[@name=$tp-type]" />
+        <xsl:when test="//tp:external-type[concat(@name, '[]')=$tp-type]" />
+        <xsl:when test="//tp:external-type[@name=$tp-type]" />
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>ERR: Unable to find type '</xsl:text>
+            <xsl:value-of select="$tp-type"/>
+            <xsl:text>'&#10;</xsl:text>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+      (<a href="#type-{$single-type}"><xsl:value-of select="$tp-type"/></a>)
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="tp:member" mode="members-in-docstring">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <code><xsl:value-of select="@name"/></code> -
+      <code><xsl:value-of select="@type"/></code>
+      <xsl:call-template name="parenthesized-tp-type"/>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:choose>
+        <xsl:when test="tp:docstring">
+          <xsl:apply-templates select="tp:docstring" />
+        </xsl:when>
+        <xsl:otherwise>
+          <em>(undocumented)</em>
+        </xsl:otherwise>
+      </xsl:choose>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="arg" mode="parameters-in-docstring">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <code><xsl:value-of select="@name"/></code> -
+      <code><xsl:value-of select="@type"/></code>
+      <xsl:call-template name="parenthesized-tp-type"/>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates select="tp:docstring" />
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="arg" mode="returns-in-docstring">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:if test="@name">
+        <code><xsl:value-of select="@name"/></code> -
+      </xsl:if>
+      <code><xsl:value-of select="@type"/></code>
+      <xsl:call-template name="parenthesized-tp-type"/>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates select="tp:docstring"/>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="tp:possible-errors/tp:error">
+    <dt xmlns="http://www.w3.org/1999/xhtml">
+      <code><xsl:value-of select="@name"/></code>
+    </dt>
+    <dd xmlns="http://www.w3.org/1999/xhtml">
+        <xsl:variable name="name" select="@name"/>
+        <xsl:choose>
+          <xsl:when test="tp:docstring">
+            <xsl:apply-templates select="tp:docstring"/>
+          </xsl:when>
+          <xsl:when test="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring">
+            <xsl:apply-templates select="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring"/> <em xmlns="http://www.w3.org/1999/xhtml">(generic description)</em>
+          </xsl:when>
+          <xsl:otherwise>
+            (Undocumented.)
+          </xsl:otherwise>
+        </xsl:choose>
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="signal">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="signal">
+      <h3 xmlns="http://www.w3.org/1999/xhtml">
+        <a name="{concat(../@name, concat('.', @name))}">
+          <xsl:value-of select="@name"/>
+        </a> (
+        <xsl:for-each xmlns="" select="arg">
+          <xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
+          <xsl:if test="position() != last()">, </xsl:if>
+        </xsl:for-each>
+        )</h3>
+      <div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
+        <xsl:apply-templates select="tp:docstring"/>
+      </div>
+
+      <xsl:if test="arg">
+        <div xmlns="http://www.w3.org/1999/xhtml">
+          <h4>Parameters</h4>
+          <dl xmlns="http://www.w3.org/1999/xhtml">
+            <xsl:apply-templates select="arg" mode="parameters-in-docstring"/>
+          </dl>
+        </div>
+      </xsl:if>
+    </div>
+  </xsl:template>
+
+  <xsl:output method="xml" indent="no" encoding="ascii"
+    omit-xml-declaration="yes"
+    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
+
+  <xsl:template match="/tp:spec">
+    <html xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>
+          <xsl:value-of select="tp:title"/>
+          <xsl:if test="tp:version">
+            <xsl:text> version </xsl:text>
+            <xsl:value-of select="tp:version"/>
+          </xsl:if>
+        </title>
+        <style type="text/css">
+
+          body {
+            font-family: sans-serif;
+            margin: 2em;
+            height: 100%;
+            font-size: 1.2em;
+          }
+          h1 {
+            padding-top: 5px;
+            padding-bottom: 5px;
+            font-size: 1.6em;
+            background: #dadae2;
+          }
+          h2 {
+            font-size: 1.3em;
+          }
+          h3 {
+            font-size: 1.2em;
+          }
+          a:link, a:visited, a:link:hover, a:visited:hover {
+            font-weight: bold;
+          }
+          .topbox {
+            padding-top: 10px;
+            padding-left: 10px;
+            border-bottom: black solid 1px;
+            padding-bottom: 10px;
+            background: #dadae2;
+            font-size: 2em;
+            font-weight: bold;
+            color: #5c5c5c;
+          }
+          .topnavbox {
+            padding-left: 10px;
+            padding-top: 5px;
+            padding-bottom: 5px;
+            background: #abacba;
+            border-bottom: black solid 1px;
+            font-size: 1.2em;
+          }
+          .topnavbox a{
+            color: black;
+            font-weight: normal;
+          }
+          .sidebar {
+            float: left;
+            /* width:9em;
+            border-right:#abacba solid 1px;
+            border-left: #abacba solid 1px;
+            height:100%; */
+            border: #abacba solid 1px;
+            padding-left: 10px;
+            margin-left: 10px;
+            padding-right: 10px;
+            margin-right: 10px;
+            color: #5d5d5d;
+            background: #dadae2;
+          }
+          .sidebar a {
+            text-decoration: none;
+            border-bottom: #e29625 dotted 1px;
+            color: #e29625;
+            font-weight: normal;
+          }
+          .sidebar h1 {
+            font-size: 1.2em;
+            color: black;
+          }
+          .sidebar ul {
+            padding-left: 25px;
+            padding-bottom: 10px;
+            border-bottom: #abacba solid 1px;
+          }
+          .sidebar li {
+            padding-top: 2px;
+            padding-bottom: 2px;
+          }
+          .sidebar h2 {
+            font-style:italic;
+            font-size: 0.81em;
+            padding-left: 5px;
+            padding-right: 5px;
+            font-weight: normal;
+          }
+          .date {
+            font-size: 0.6em;
+            float: right;
+            font-style: italic;
+          }
+          .method {
+            margin-left: 1em;
+            margin-right: 4em;
+          }
+          .signal {
+            margin-left: 1em;
+            margin-right: 4em;
+          }
+
+        </style>
+      </head>
+      <body>
+        <h1 class="topbox">
+          <xsl:value-of select="tp:title" />
+        </h1>
+        <xsl:if test="tp:version">
+          <h2>Version <xsl:apply-templates select="tp:version"/></h2>
+        </xsl:if>
+        <xsl:apply-templates select="tp:copyright"/>
+        <xsl:apply-templates select="tp:license"/>
+        <xsl:apply-templates select="tp:docstring"/>
+
+        <h2>Interfaces</h2>
+        <ul>
+        <xsl:for-each select="node/interface">
+            <li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
+          </xsl:for-each>
+        </ul>
+
+        <xsl:apply-templates select="node"/>
+        <xsl:apply-templates select="tp:generic-types"/>
+        <xsl:apply-templates select="tp:errors"/>
+
+        <h1>Index</h1>
+        <h2>Index of interfaces</h2>
+        <ul>
+        <xsl:for-each select="node/interface">
+            <li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
+          </xsl:for-each>
+        </ul>
+        <h2>Index of types</h2>
+        <ul>
+          <xsl:for-each select="//tp:simple-type | //tp:enum | //tp:flags | //tp:mapping | //tp:struct | //tp:external-type">
+            <xsl:sort select="@name"/>
+            <li>
+              <code>
+                <a href="#type-{@name}">
+                  <xsl:value-of select="@name"/>
+                </a>
+              </code>
+              <xsl:apply-templates mode="in-index" select="."/>
+            </li>
+          </xsl:for-each>
+        </ul>
+      </body>
+    </html>
+  </xsl:template>
+
+</xsl:stylesheet>
+
+<!-- vim:set sw=2 sts=2 et: -->