summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2003-07-10 20:18:16 +0000
committerShaun McCance <shaunm@src.gnome.org>2003-07-10 20:18:16 +0000
commit08e8b64ab63f735fdf87cf558ae9444384a573af (patch)
treebb52cfd4ecb4ffd3278e7c70f74b453f62fc7e20
parent9387e76e145d9204d9ffc066440daf008f5deeca (diff)
downloadyelp-08e8b64ab63f735fdf87cf558ae9444384a573af.tar.gz
- Make Previous and Next links only link to divisions with the id
* stylesheets/yelp-functions.xsl: - Make Previous and Next links only link to divisions with the id attribute.
-rw-r--r--stylesheets/ChangeLog7
-rw-r--r--stylesheets/yelp-functions.xsl16
2 files changed, 16 insertions, 7 deletions
diff --git a/stylesheets/ChangeLog b/stylesheets/ChangeLog
index f4958686..17560845 100644
--- a/stylesheets/ChangeLog
+++ b/stylesheets/ChangeLog
@@ -1,3 +1,10 @@
+2003-07-10 Shaun McCance <shaunm@wolfram.com>
+
+ * yelp-functions.xsl: Only link Previous and Next to divisions
+ that have the id attribute. Yelp and SK currently arent'
+ capable of working with id-less divisions, so we shouldn't
+ link to them with Previous and Next.
+
2003-07-07 Shaun McCance <shaunm@wolfram.com>
* yelp-custom.xsl: Initial work on header spacing
diff --git a/stylesheets/yelp-functions.xsl b/stylesheets/yelp-functions.xsl
index 6aaca2e8..c010332a 100644
--- a/stylesheets/yelp-functions.xsl
+++ b/stylesheets/yelp-functions.xsl
@@ -10,16 +10,18 @@
<xsl:choose>
<xsl:when test="
($node/preceding-sibling::*/descendant-or-self::*)
+ [@id]
[yelp:is-division(.)]
[yelp:get-depth(.) &lt;= $gdb_max_chunk_depth]">
<func:result select="
($node/preceding-sibling::*/descendant-or-self::*)
+ [@id]
[yelp:is-division(.)]
[yelp:get-depth(.) &lt;= $gdb_max_chunk_depth]
[last()]"/>
</xsl:when>
<xsl:when test="yelp:get-depth($node) &gt; 1">
- <func:result select="$node/ancestor::*[yelp:is-division(.)][1]"/>
+ <func:result select="$node/ancestor::*[@id][yelp:is-division(.)][1]"/>
</xsl:when>
<xsl:otherwise>
<func:result select="'toc'"/>
@@ -32,14 +34,14 @@
<xsl:choose>
<xsl:when test="
(yelp:get-depth($node) &lt; $gdb_max_chunk_depth) and
- (count(yelp:get-divisions($node)) &gt; 1)">
- <func:result select="yelp:get-divisions($node)[1]"/>
+ (count(yelp:get-divisions($node)[@id]) &gt; 1)">
+ <func:result select="yelp:get-divisions($node)[@id][1]"/>
</xsl:when>
- <xsl:when test="$node/following-sibling::*[yelp:is-division(.)]">
- <func:result select="$node/following-sibling::*[yelp:is-division(.)][1]"/>
+ <xsl:when test="$node/following-sibling::*[@id][yelp:is-division(.)]">
+ <func:result select="$node/following-sibling::*[@id][yelp:is-division(.)][1]"/>
</xsl:when>
- <xsl:when test="$node/following::*[yelp:is-division(.)]">
- <func:result select="$node/following::*[yelp:is-division(.)][1]"/>
+ <xsl:when test="$node/following::*[@id][yelp:is-division(.)]">
+ <func:result select="$node/following::*[@id][yelp:is-division(.)][1]"/>
</xsl:when>
<xsl:otherwise>
<func:result select="false()"/>