summaryrefslogtreecommitdiffstats
path: root/docs/xsl
diff options
context:
space:
mode:
authorJohn Finlay <finlay@src.gnome.org>2006-07-19 09:49:56 +0000
committerJohn Finlay <finlay@src.gnome.org>2006-07-19 09:49:56 +0000
commit8976c90f8565b70b6f6ecfebdf3f04e7e812e698 (patch)
treece1727a0536a45fd50f514c117eceee92838e4ff /docs/xsl
parentc5a6e6aa7f3a398aeb70b1be354c957b45f870b4 (diff)
downloadpygobject-8976c90f8565b70b6f6ecfebdf3f04e7e812e698.tar.gz
pygobject-8976c90f8565b70b6f6ecfebdf3f04e7e812e698.tar.xz
pygobject-8976c90f8565b70b6f6ecfebdf3f04e7e812e698.zip
Output xref links for unknown links.
* docs/xsl/html.xsl: Output xref links for unknown links. * docs/xsl/ref-html-style.xsl: Include refsect1 and refsect2 in indexed items but only ig they have ids. * configure.ac (AC_CONFIG_FILES) : Add docs/reference/version.xml * docs/reference/pygobject-ref.xml: Add pygobject-introduction.xml and version and builddate entities. Remove commented out items. * docs/Makefile.am: Add reference/pygobject-introduction.xml and reference/version.xml.in
Diffstat (limited to 'docs/xsl')
-rw-r--r--docs/xsl/common.xsl3
-rw-r--r--docs/xsl/html.xsl18
-rw-r--r--docs/xsl/ref-html-style.xsl24
3 files changed, 31 insertions, 14 deletions
diff --git a/docs/xsl/common.xsl b/docs/xsl/common.xsl
index cb4a7d2..606313f 100644
--- a/docs/xsl/common.xsl
+++ b/docs/xsl/common.xsl
@@ -1,4 +1,4 @@
-<?xml version='1.0'?> <!--*- mode: xml -*-->
+<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet [
]>
@@ -16,5 +16,4 @@
</xsl:choose>
</xsl:template>
-
</xsl:stylesheet>
diff --git a/docs/xsl/html.xsl b/docs/xsl/html.xsl
index 350f183..3bb5638 100644
--- a/docs/xsl/html.xsl
+++ b/docs/xsl/html.xsl
@@ -1,4 +1,4 @@
-<?xml version='1.0'?> <!--*- mode: xml -*-->
+<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY RE "&#10;">
<!ENTITY nbsp "&#160;">
@@ -262,6 +262,22 @@
<xsl:apply-templates select="."/>
</xsl:template>
+ <!-- ========================================================= -->
+ <!-- template to output gtkdoclink elements for the unknown targets -->
+
+ <xsl:template match="link">
+ <xsl:choose>
+ <xsl:when test="id(@linkend)">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <PYGTKDOCLINK HREF="{@linkend}">
+ <xsl:apply-templates/>
+ </PYGTKDOCLINK>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
<xsl:template match="parameter" mode="python">
<span class="{name(.)}">
<xsl:choose>
diff --git a/docs/xsl/ref-html-style.xsl b/docs/xsl/ref-html-style.xsl
index 124a117..4fc86e7 100644
--- a/docs/xsl/ref-html-style.xsl
+++ b/docs/xsl/ref-html-style.xsl
@@ -1,4 +1,4 @@
-<?xml version='1.0'?> <!--*- mode: xml -*-->
+<?xml version='1.0'?>
<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"/>
@@ -14,7 +14,7 @@
<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"
+ <xsl:apply-templates select="//anchor|//refentry|//refsect1|//refsect2"
mode="generate.index.mode"/>
</xsl:with-param>
<xsl:with-param name="encoding" select="'utf-8'"/>
@@ -23,16 +23,18 @@
<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:if test="@id">
+ <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:if>
</xsl:template>