summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Fleck <jfleck@inkstain.net>2003-04-02 03:12:01 +0000
committerJohn Fleck <jfleck@src.gnome.org>2003-04-02 03:12:01 +0000
commitc26b1fa0ced2c61b808e6f0d47741caf4ba15022 (patch)
tree5df7066f4fe1921f08d059734ddcddd1e7171ea8
parent093d7360a510baa5fd9dd39ff5b1dc0586d25204 (diff)
downloadyelp-c26b1fa0ced2c61b808e6f0d47741caf4ba15022.tar.gz
stylesheets/yelp-customization.xsl More from Shaun McCance, fixes #82760
2003-04-01 John Fleck <jfleck@inkstain.net> * stylesheets/yelp-customization.xsl More from Shaun McCance, fixes #82760
-rw-r--r--ChangeLog5
-rw-r--r--stylesheets/yelp-customization.xsl226
2 files changed, 107 insertions, 124 deletions
diff --git a/ChangeLog b/ChangeLog
index 76035a2c..10988f87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
2003-04-01 John Fleck <jfleck@inkstain.net>
* stylesheets/yelp-customization.xsl
+ More from Shaun McCance, fixes #82760
+
+2003-04-01 John Fleck <jfleck@inkstain.net>
+
+ * stylesheets/yelp-customization.xsl
Patch from Shaun McCance fixing #91611
2003-03-31 Mikael Hallendal <micke@codefactory.se>
diff --git a/stylesheets/yelp-customization.xsl b/stylesheets/yelp-customization.xsl
index f4b8b956..b2464e06 100644
--- a/stylesheets/yelp-customization.xsl
+++ b/stylesheets/yelp-customization.xsl
@@ -231,46 +231,46 @@
<!-- the chunking machinery -->
<xsl:template name="next.link.cell">
-<xsl:param name="object" select="."/>
+ <xsl:param name="object" select="."/>
<td align="right" width="33%"><a accesskey="n">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$object"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="$object/title">
- <xsl:value-of select="$object/title/text()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'Next'"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$object"/>
</xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text> &gt;&gt;&gt;</xsl:text>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="$object/title">
+ <xsl:value-of select="$object/title/text()"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Next'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text> &gt;&gt;&gt;</xsl:text>
</a></td>
</xsl:template>
<xsl:template name="prev.link.cell">
-<xsl:param name="object" select="."/>
+ <xsl:param name="object" select="."/>
<td align="left" width="33%"><a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$object"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:text>&lt;&lt;&lt; </xsl:text>
- <xsl:choose>
- <xsl:when test="$object/title">
- <xsl:value-of select="$object/title/text()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'Previous'"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$object"/>
</xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
+ </xsl:attribute>
+ <xsl:text>&lt;&lt;&lt; </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$object/title">
+ <xsl:value-of select="$object/title/text()"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Previous'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</a></td>
</xsl:template>
@@ -279,6 +279,7 @@
<xsl:value-of select="$gdb_docname"/>
</xsl:template>
+<!-- I believe indirect.*.cell can be removed -->
<xsl:template name="indirect.prev.cell">
<xsl:param name="object" select="."/>
<xsl:choose>
@@ -318,47 +319,26 @@
<xsl:template name="article.chunk.prev">
<xsl:param name="node" select="."/>
- <xsl:choose>
-
- <xsl:when test="count($node/preceding-sibling::*) > 1">
- <xsl:call-template name="prev.link.cell">
- <xsl:with-param name="object" select="$node/preceding-sibling::*[1]"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="local-name($node)='sect2' and count($node/../preceding-sibling::sect1[position()=last()]/sect2) > 0">
- <xsl:call-template name="indirect.prev.cell">
- <xsl:with-param name="object" select="$node/../preceding-sibling::sect1[position()=last()]"/>
- </xsl:call-template>
- </xsl:when>
-
- <!-- we need to treat the first sect1 specially -->
- <xsl:when test="$node=/article/sect1[1] or $node=/part/chapter/sect1[1]">
- <td><a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="article.toc.ref"/>
- </xsl:attribute>
- <xsl:text>&lt;&lt;&lt; </xsl:text>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'Previous'"/>
- </xsl:call-template>
- </a></td>
- </xsl:when>
-
- <!-- And the first sect2 of the first sect1 needs the same -->
- <xsl:when test="$node=/article/sect1[1]/sect2[1] or $node=/part/chapter/sect1[1]/sect2[1]">
- <td><a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="article.toc.ref"/>
- </xsl:attribute>
- <xsl:text>&lt;&lt;&lt; </xsl:text>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'Previous'"/>
- </xsl:call-template>
- </a></td>
+ <xsl:choose>
+ <!-- the first sect(x) goes back to TOC -->
+ <xsl:when test="count($node/preceding::*[local-name()=local-name($node)])=0">
+ <td><a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="article.toc.ref"/>
+ </xsl:attribute>
+ <xsl:text>&lt;&lt;&lt; </xsl:text>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Contents'"/>
+ </xsl:call-template>
+ </a></td>
</xsl:when>
-
- </xsl:choose>
+ <xsl:otherwise>
+ <xsl:call-template name="prev.link.cell">
+ <xsl:with-param name="object"
+ select="$node/preceding::*[local-name()=local-name($node)][1]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template name="article.chunk.up">
@@ -382,22 +362,18 @@
<xsl:template name="article.chunk.next">
<xsl:param name="node" select="."/>
- <xsl:choose>
- <xsl:when test="count($node/following-sibling::*) > 0">
- <xsl:call-template name="next.link.cell">
- <xsl:with-param name="object" select="$node/following-sibling::*[1]"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node)='sect2' and count($node/../following-sibling::sect1[1]/sect2) > 0">
- <xsl:call-template name="indirect.next.cell">
- <xsl:with-param name="object" select="$node/../following-sibling::sect1[1]"/>
- </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="count($node/following::*[local-name()=local-name($node)])>0">
+ <xsl:call-template name="next.link.cell">
+ <xsl:with-param name="object"
+ select="$node/following::*[local-name()=local-name($node)][1]"/>
+ </xsl:call-template>
</xsl:when>
<xsl:otherwise>
- <td align="right" width="33%">
- </td>
+ <td align="right" width="33%">
+ </td>
</xsl:otherwise>
- </xsl:choose>
+ </xsl:choose>
</xsl:template>
<xsl:template name="article.chunk.navigate">
@@ -447,48 +423,50 @@
</xsl:template>
<xsl:template name="make.toc.navbar">
- <table width="100%">
- <tr>
- <td width="33%"><a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="titlepage.ref"/>
- </xsl:attribute>
- <xsl:text>&lt;&lt;&lt; </xsl:text>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'Previous'"/>
- </xsl:call-template>
- </a></td>
- <td></td>
- <xsl:choose>
- <xsl:when test="local-name(.) = 'part'">
- <xsl:call-template name="next.link.cell">
- <xsl:with-param name="object" select="chapter[1]/sect1[1]"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="next.link.cell">
- <xsl:with-param name="object" select="sect1[1]"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </tr>
- </table>
+ <table width="100%">
+ <tr>
+ <td width="33%"><a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="titlepage.ref"/>
+ </xsl:attribute>
+ <xsl:text>&lt;&lt;&lt; </xsl:text>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Previous'"/>
+ </xsl:call-template>
+ </a></td>
+ <!-- No extra td due to GtkHTML bug
+ <td></td>
+ -->
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'part'">
+ <xsl:call-template name="next.link.cell">
+ <xsl:with-param name="object" select="chapter[1]/sect1[1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="next.link.cell">
+ <xsl:with-param name="object" select="sect1[1]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+ </table>
</xsl:template>
<xsl:template name="make.titlep.navbar">
- <table width="100%">
- <tr>
- <td align="right"><a accesskey="n">
- <xsl:attribute name="href">
- <xsl:call-template name="article.toc.ref"/>
- </xsl:attribute>
- <xsl:call-template name="gentext">
- <xsl:with-param name="key" select="'Next'"/>
- </xsl:call-template>
- <xsl:text> &gt;&gt;&gt;</xsl:text>
- </a></td>
- </tr>
- </table>
+ <table width="100%">
+ <tr>
+ <td align="right"><a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="article.toc.ref"/>
+ </xsl:attribute>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Contents'"/>
+ </xsl:call-template>
+ <xsl:text> &gt;&gt;&gt;</xsl:text>
+ </a></td>
+ </tr>
+ </table>
</xsl:template>