diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2003-07-10 20:18:16 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2003-07-10 20:18:16 +0000 |
commit | 08e8b64ab63f735fdf87cf558ae9444384a573af (patch) | |
tree | bb52cfd4ecb4ffd3278e7c70f74b453f62fc7e20 | |
parent | 9387e76e145d9204d9ffc066440daf008f5deeca (diff) | |
download | yelp-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/ChangeLog | 7 | ||||
-rw-r--r-- | stylesheets/yelp-functions.xsl | 16 |
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(.) <= $gdb_max_chunk_depth]"> <func:result select=" ($node/preceding-sibling::*/descendant-or-self::*) + [@id] [yelp:is-division(.)] [yelp:get-depth(.) <= $gdb_max_chunk_depth] [last()]"/> </xsl:when> <xsl:when test="yelp:get-depth($node) > 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) < $gdb_max_chunk_depth) and - (count(yelp:get-divisions($node)) > 1)"> - <func:result select="yelp:get-divisions($node)[1]"/> + (count(yelp:get-divisions($node)[@id]) > 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()"/> |