summaryrefslogtreecommitdiffstats
path: root/docs/xsl
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2006-07-13 14:28:18 +0000
committerJohan Dahlin <johan@src.gnome.org>2006-07-13 14:28:18 +0000
commitf80b6b9f96a027d926c9ee3d31f0ca8eb05272bf (patch)
tree896020f44da01537e545ae636f6bca0ff0c1e7d8 /docs/xsl
parente42d69c953858ed0a4b93cd346aa01e733c8a6ff (diff)
downloadpygobject-f80b6b9f96a027d926c9ee3d31f0ca8eb05272bf.tar.gz
pygobject-f80b6b9f96a027d926c9ee3d31f0ca8eb05272bf.tar.xz
pygobject-f80b6b9f96a027d926c9ee3d31f0ca8eb05272bf.zip
Move xsl to a separate directory, install them and include a few more things in the tarball
Diffstat (limited to 'docs/xsl')
-rw-r--r--docs/xsl/common.xsl20
-rw-r--r--docs/xsl/devhelp.xsl154
-rw-r--r--docs/xsl/html.xsl288
-rw-r--r--docs/xsl/pdf-style.xsl11
-rw-r--r--docs/xsl/pdf.xsl259
-rw-r--r--docs/xsl/ref-html-style.xsl52
6 files changed, 784 insertions, 0 deletions
diff --git a/docs/xsl/common.xsl b/docs/xsl/common.xsl
new file mode 100644
index 0000000..cb4a7d2
--- /dev/null
+++ b/docs/xsl/common.xsl
@@ -0,0 +1,20 @@
+<?xml version='1.0'?> <!--*- mode: xml -*-->
+<!DOCTYPE xsl:stylesheet [
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:template match="parameter">
+ <xsl:choose>
+ <xsl:when test="@role = 'keyword'">
+ <xsl:call-template name="inline.boldmonoseq"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.italicmonoseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+</xsl:stylesheet>
diff --git a/docs/xsl/devhelp.xsl b/docs/xsl/devhelp.xsl
new file mode 100644
index 0000000..b329a4c
--- /dev/null
+++ b/docs/xsl/devhelp.xsl
@@ -0,0 +1,154 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'
+ xmlns="http://www.devhelp.net/book"
+ exclude-result-prefixes="#default">
+
+ <xsl:template name="generate.devhelp">
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename">
+ <xsl:choose>
+ <xsl:when test="$gtkdoc.bookname">
+ <xsl:value-of select="$gtkdoc.bookname"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>book</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>.devhelp</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="method" select="'xml'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
+ <xsl:with-param name="encoding" select="'utf-8'"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="devhelp"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="devhelp">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="generate.devhelp.toc.title.mode"/>
+ </xsl:variable>
+ <xsl:variable name="link">
+ <xsl:call-template name="href.target"/>
+ </xsl:variable>
+ <xsl:variable name="author">
+ <xsl:if test="articleinfo|bookinfo">
+ <xsl:apply-templates mode="generate.devhelp.authors"
+ select="articleinfo|bookinfo"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="toc.nodes" select="part|reference|preface|chapter|
+ appendix|article|bibliography|
+ glossary|index|refentry|
+ bridgehead|sect1"/>
+
+ <book title="{$title}" link="{$link}" author="{$author}" name="{$gtkdoc.bookname}">
+ <xsl:if test="$toc.nodes">
+ <chapters>
+ <xsl:apply-templates select="$toc.nodes"
+ mode="generate.devhelp.toc.mode"/>
+ </chapters>
+ </xsl:if>
+ <functions>
+ <xsl:apply-templates select="//refsect1"
+ mode="generate.devhelp.constructor.index.mode"/>
+ <xsl:apply-templates select="//refsect2"
+ mode="generate.devhelp.index.mode"/>
+ </functions>
+ </book>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.devhelp.toc.mode">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="generate.devhelp.toc.title.mode"/>
+ </xsl:variable>
+ <xsl:variable name="target">
+ <xsl:variable name="anchor" select="title/anchor"/>
+ <xsl:choose>
+ <xsl:when test="$anchor">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$anchor"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <sub name="{$title}" link="{$target}">
+ <xsl:apply-templates select="section|sect1|
+ refentry|refsect|
+ bridgehead|part|chapter"
+ mode="generate.devhelp.toc.mode"/>
+ </sub>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.devhelp.index.mode">
+ <xsl:variable name="title" select="title"/>
+ <xsl:variable name="anchor" select="title/anchor"/>
+ <xsl:variable name="target">
+ <xsl:choose>
+ <xsl:when test="$anchor">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$anchor"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <function name="{$title}" link="{$target}"/>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.devhelp.constructor.index.mode">
+ <xsl:variable name="title" select="title"/>
+ <xsl:variable name="anchor" select="title/anchor"/>
+ <xsl:variable name="target">
+ <xsl:choose>
+ <xsl:when test="$anchor">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$anchor"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="$title='Constructor'">
+ <xsl:variable name ="constructor" select="programlisting//methodname"/>
+ <function name="{$constructor}" link="{$target}"/>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- get title -->
+ <xsl:template match="article" mode="generate.devhelp.toc.title.mode">
+ <xsl:value-of select="articleinfo/title"/>
+ </xsl:template>
+ <xsl:template match="book" mode="generate.devhelp.toc.title.mode">
+ <xsl:value-of select="bookinfo/title"/>
+ </xsl:template>
+ <xsl:template match="refentry" mode="generate.devhelp.toc.title.mode">
+ <xsl:value-of select="refnamediv/refname"/>
+ </xsl:template>
+ <xsl:template match="*" mode="generate.devhelp.toc.title.mode">
+ <xsl:value-of select="title"/>
+ </xsl:template>
+
+ <!-- generate list of authors ... -->
+ <xsl:template match="articleinfo|bookinfo" mode="generate.devhelp.authors">
+ <xsl:for-each select="authorgroup/author">
+ <xsl:value-of select="firstname"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="surname"/>
+ <xsl:if test="not(last())">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/html.xsl b/docs/xsl/html.xsl
new file mode 100644
index 0000000..350f183
--- /dev/null
+++ b/docs/xsl/html.xsl
@@ -0,0 +1,288 @@
+<?xml version='1.0'?> <!--*- mode: xml -*-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY RE "&#10;">
+<!ENTITY nbsp "&#160;">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:param name="shade.verbatim" select="1"/>
+<xsl:param name="use.id.as.filename" select="1"/>
+<xsl:param name="chunk.fast" select="1"/>
+<xsl:param name="chunker.output.encoding" select="'utf-8'"/>
+
+<xsl:attribute-set name="shade.verbatim.style">
+ <xsl:attribute name="border">0</xsl:attribute>
+ <xsl:attribute name="bgcolor">#E0E0E0</xsl:attribute>
+ <xsl:attribute name="width">100%</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:param name="linenumbering.extension" select="1"/>
+<xsl:param name="variablelist.as.table" select="1"/>
+
+<xsl:template match="blockquote">
+ <div class="{local-name(.)}">
+ <xsl:if test="@lang or @xml:lang">
+ <xsl:call-template name="language.attribute"/>
+ </xsl:if>
+ <xsl:call-template name="anchor"/>
+
+ <xsl:choose>
+ <xsl:when test="attribution">
+ <table border="0" width="100%"
+ cellspacing="0" cellpadding="0" class="blockquote"
+ summary="Block quote">
+ <tr>
+ <td width="10%" valign="top">&#160;</td>
+ <td width="80%" valign="top">
+ <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+ </td>
+ <td width="10%" valign="top">&#160;</td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right" valign="top">
+ <xsl:text>--</xsl:text>
+ <xsl:apply-templates select="attribution"/>
+ </td>
+ <td width="10%" valign="top">&#160;</td>
+ </tr>
+ </table>
+ </xsl:when>
+ <xsl:when test="@role = 'properties' or @role = 'prototypes'">
+ <xsl:choose>
+ <xsl:when test="$shade.verbatim != 0">
+ <table width="100%" xsl:use-attribute-sets="shade.verbatim.style">
+ <tr>
+ <td valign="top">
+ <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+ </td>
+ </tr>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <table width="100%" border="0">
+ <tr>
+ <td valign="top">
+ <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+ </td>
+ </tr>
+ </table>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <blockquote class="{local-name(.)}">
+ <xsl:apply-templates/>
+ </blockquote>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</xsl:template>
+
+ <!-- support for Python language for synopsises -->
+ <xsl:template match="classsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |constructorsynopsis
+ |destructorsynopsis">
+ <xsl:param name="language">
+ <xsl:choose>
+ <xsl:when test="@language">
+ <xsl:value-of select="@language"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$default-classsynopsis-language"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+ <xsl:choose>
+ <xsl:when test="$language='python'">
+ <xsl:apply-templates select="." mode="python"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-imports/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="classsynopsis" mode="python">
+ <table bgcolor="#D0E0F0" width="100%">
+ <tr><td>
+ <pre class="{name(.)}">
+ <xsl:text>class </xsl:text>
+ <xsl:apply-templates select="ooclass[1]" mode="python"/>
+ <xsl:if test="ooclass[position() &gt; 1]">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="python"/> <xsl:text>)</xsl:text>
+ </xsl:if>
+ <xsl:text>:&RE;</xsl:text>
+
+ <xsl:apply-templates select="constructorsynopsis
+ |destructorsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |classsynopsisinfo" mode="python"/>
+ </pre></td></tr></table>
+ </xsl:template>
+
+ <xsl:template match="classsynopsisinfo" mode="python">
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="ooclass|oointerface|ooexception" mode="python">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="modifier" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="classname" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="interfacename" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="exceptionname" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="fieldsynopsis" mode="python">
+ <code class="{name(.)}">
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ <xsl:apply-templates mode="python"/>
+ </code>
+ <xsl:call-template name="synop-break"/>
+ </xsl:template>
+
+ <xsl:template match="type" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="varname" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="initializer" mode="python">
+ <span class="{name(.)}">
+ <xsl:text>=</xsl:text>
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="void" mode="python">
+ <span class="{name(.)}">
+ <xsl:text>void&nbsp;</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="methodname" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template match="methodparam" mode="python">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+
+ <xsl:template mode="python"
+ match="destructorsynopsis|methodsynopsis">
+
+ <code class="{name(.)}">
+ <xsl:text> def </xsl:text>
+ <xsl:apply-templates select="methodname" mode="python"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="python"/>
+ <xsl:text>)</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+ </xsl:template>
+
+ <xsl:template mode="python"
+ match="constructorsynopsis">
+
+ <code class="{name(.)}">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="methodname" mode="python"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="python"/>
+ <xsl:text>)</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+ </xsl:template>
+
+<!-- this was the original parameter python mode styling
+ <xsl:template match="parameter" mode="python">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="python"/>
+ </span>
+ </xsl:template>
+-->
+
+ <!-- hack -->
+ <xsl:template match="link" mode="python">
+ <xsl:apply-templates select="."/>
+ </xsl:template>
+
+ <xsl:template match="parameter" mode="python">
+ <span class="{name(.)}">
+ <xsl:choose>
+ <xsl:when test="@role = 'keyword'">
+ <xsl:call-template name="inline.boldmonoseq"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.italicmonoseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+</xsl:template>
+
+<xsl:template match="variablelist">
+ <table border="0" width="100%" bgcolor="#FFECCE">
+ <col align="left" valign="top" width="0*">
+ </col>
+ <tbody>
+ <xsl:apply-templates select="varlistentry" mode="varlist-table"/>
+ </tbody>
+ </table>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/pdf-style.xsl b/docs/xsl/pdf-style.xsl
new file mode 100644
index 0000000..d4a8e02
--- /dev/null
+++ b/docs/xsl/pdf-style.xsl
@@ -0,0 +1,11 @@
+<?xml version='1.0'?> <!--*- mode: xml -*-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
+<xsl:include href="common.xsl"/>
+<xsl:include href="pdf.xsl"/>
+
+<xsl:param name="section.autolabel" select="1"/>
+<xsl:param name="section.label.includes.component.label" select="1"/>
+
+</xsl:stylesheet>
diff --git a/docs/xsl/pdf.xsl b/docs/xsl/pdf.xsl
new file mode 100644
index 0000000..013bfd0
--- /dev/null
+++ b/docs/xsl/pdf.xsl
@@ -0,0 +1,259 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY RE "&#10;">
+<!ENTITY nbsp "&#160;">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ version='1.0'>
+
+<xsl:param name="body.margin.top">0.5in</xsl:param>
+
+<xsl:template name="is.graphic.extension">
+ <xsl:param name="ext"></xsl:param>
+ <xsl:if test="$ext = 'png'
+ or $ext = 'pdf'
+ or $ext = 'jpeg'
+ or $ext = 'gif'
+ or $ext = 'tif'
+ or $ext = 'tiff'
+ or $ext = 'bmp'">1</xsl:if>
+</xsl:template>
+
+ <!-- support for Python language for synopsises -->
+ <xsl:template match="classsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |constructorsynopsis
+ |destructorsynopsis">
+ <xsl:param name="language">
+ <xsl:choose>
+ <xsl:when test="@language">
+ <xsl:value-of select="@language"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$default-classsynopsis-language"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+ <xsl:choose>
+ <xsl:when test="$language='python'">
+ <xsl:apply-templates select="." mode="python"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-imports/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="classsynopsis" mode="python">
+ <fo:block wrap-option='no-wrap'
+ white-space-collapse='false'
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="monospace.verbatim.properties"
+ background-color="#E0E0E0">
+ <xsl:text>class </xsl:text>
+ <xsl:apply-templates select="ooclass[1]" mode="python"/>
+ <xsl:if test="ooclass[position() &gt; 1]">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="python"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ <xsl:text>&nbsp;:</xsl:text>
+
+ <xsl:apply-templates select="constructorsynopsis
+ |destructorsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |classsynopsisinfo" mode="python"/>
+
+ </fo:block>
+ <xsl:text>&RE;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="classsynopsisinfo" mode="python">
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="ooclass|oointerface|ooexception" mode="python">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="modifier" mode="python">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="classname" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="interfacename" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="exceptionname" mode="python">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="fieldsynopsis" mode="python">
+ <fo:block wrap-option='no-wrap'
+ white-space-collapse='false'
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="monospace.verbatim.properties">
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ <xsl:apply-templates mode="python"/>
+ <xsl:call-template name="synop-break"/>
+ </fo:block>
+ </xsl:template>
+
+ <xsl:template match="type" mode="python">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="varname" mode="python">
+ <xsl:apply-templates mode="python"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="initializer" mode="python">
+ <xsl:text>=</xsl:text>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="void" mode="python">
+ <xsl:text>void&nbsp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="methodname" mode="python">
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template match="methodparam" mode="python">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="python"/>
+ </xsl:template>
+
+ <xsl:template mode="python"
+ match="destructorsynopsis|methodsynopsis">
+
+ <fo:block wrap-option='no-wrap'
+ white-space-collapse='false'
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="monospace.verbatim.properties">
+ <xsl:text> def </xsl:text>
+ <xsl:apply-templates select="methodname" mode="python"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="python"/>
+ <xsl:text>)</xsl:text>
+<!-- <xsl:call-template name="synop-break"/> -->
+ </fo:block>
+ </xsl:template>
+
+ <xsl:template mode="python"
+ match="constructorsynopsis">
+ <fo:block wrap-option='no-wrap'
+ white-space-collapse='false'
+ linefeed-treatment="preserve"
+ xsl:use-attribute-sets="monospace.verbatim.properties">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="methodname" mode="python"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="python"/>
+ <xsl:text>)</xsl:text>
+ </fo:block>
+ </xsl:template>
+
+ <!-- hack -->
+ <xsl:template match="link" mode="python">
+ <xsl:apply-templates select="."/>
+ </xsl:template>
+
+<!--
+<xsl:template match="variablelist" mode="vl.as.blocks">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:if test="title">
+ <xsl:apply-templates select="title" mode="list.title.mode"/>
+ </xsl:if>
+
+ <fo:block id="{$id}"
+ xsl:use-attribute-sets="list.block.spacing"
+ background-color="#FFECCE">
+ <xsl:apply-templates mode="vl.as.blocks"/>
+ </fo:block>
+</xsl:template>
+-->
+
+<!--
+<xsl:template match="variablelist">
+ <fo:table border="0"
+ width="100%"
+ background-color="#FFECCE"
+ table-layout="fixed">
+ <fo:table-column
+ align="left"
+ column-width="20%"
+ column-number="1">
+ </fo:table-column>
+ <fo:table-column
+ align="left"
+ column-width="80%"
+ column-number="2">
+ </fo:table-column>
+ <fo:table-body>
+ <xsl:apply-templates select="varlistentry"/>
+ </fo:table-body>
+ </fo:table>
+</xsl:template>
+
+<xsl:template match="varlistentry">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block
+ background-color="#FFECCE">
+ <xsl:apply-templates select="term"/>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block
+ background-color="#FFECCE">
+ <xsl:apply-templates select="listitem"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+</xsl:template>
+
+<xsl:template match="varlistentry/term">
+ <xsl:apply-templates/>
+ <xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="varlistentry/term[position()=last()]" priority="2">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="varlistentry/listitem">
+ <xsl:apply-templates/>
+</xsl:template>
+-->
+
+</xsl:stylesheet>
diff --git a/docs/xsl/ref-html-style.xsl b/docs/xsl/ref-html-style.xsl
new file mode 100644
index 0000000..124a117
--- /dev/null
+++ b/docs/xsl/ref-html-style.xsl
@@ -0,0 +1,52 @@
+<?xml version='1.0'?> <!--*- mode: xml -*-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
+<xsl:include href="common.xsl"/>
+<xsl:include href="html.xsl"/>
+<xsl:include href="devhelp.xsl"/>
+
+ <!-- ========================================================= -->
+ <!-- template to create the index.sgml anchor index -->
+
+ <xsl:template name="generate.index">
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename" select="'index.sgml'"/>
+ <xsl:with-param name="content">
+ <!-- check all anchor and refentry elements -->
+ <xsl:apply-templates select="//anchor|//refentry"
+ mode="generate.index.mode"/>
+ </xsl:with-param>
+ <xsl:with-param name="encoding" select="'utf-8'"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="*" mode="generate.index.mode">
+ <xsl:if test="not(@href)">
+ <xsl:text>&lt;ANCHOR id=&quot;</xsl:text>
+ <xsl:value-of select="@id"/>
+ <xsl:text>&quot; href=&quot;</xsl:text>
+ <xsl:if test="$gtkdoc.bookname">
+ <xsl:value-of select="$gtkdoc.bookname"/>
+ <xsl:text>/</xsl:text>
+ </xsl:if>
+ <xsl:call-template name="href.target"/>
+ <xsl:text>&quot;&gt;
+ </xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:param name="gtkdoc.version" select="''"/>
+ <xsl:param name="gtkdoc.bookname" select="''"/>
+
+ <xsl:param name="refentry.generate.name" select="0"/>
+ <xsl:param name="refentry.generate.title" select="1"/>
+ <xsl:param name="chapter.autolabel" select="0"/>
+
+ <xsl:template match="book|article">
+ <xsl:apply-imports/>
+ <xsl:call-template name="generate.devhelp"/>
+ <xsl:call-template name="generate.index"/>
+ </xsl:template>
+
+</xsl:stylesheet>