summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2003-07-07 23:15:38 +0000
committerShaun McCance <shaunm@src.gnome.org>2003-07-07 23:15:38 +0000
commit1a705fc2a4e6ba49da13e3953d858dd006e5a382 (patch)
tree126b379aba75bb8940bbc4edfbc0cc6d98955392
parentb15340d9d4383ce7e42a326c2b6135eeed83bd84 (diff)
downloadyelp-1a705fc2a4e6ba49da13e3953d858dd006e5a382.tar.gz
- Move the id-less part hackery into get-divisions
* yelp-customization.xsl: * yelp-functions.xsl: - Move the id-less part hackery into get-divisions
-rw-r--r--stylesheets/ChangeLog8
-rw-r--r--stylesheets/yelp-customization.xsl32
-rw-r--r--stylesheets/yelp-functions.xsl6
3 files changed, 20 insertions, 26 deletions
diff --git a/stylesheets/ChangeLog b/stylesheets/ChangeLog
index 6f0a53b0..0f34fd86 100644
--- a/stylesheets/ChangeLog
+++ b/stylesheets/ChangeLog
@@ -1,3 +1,11 @@
+2003-07-07 Shaun McCacne <shaunm@wolfram.com
+
+ * yelp-customization.xsl:
+ * yelp-functions.xsl:
+ - Move the id-less part hackery into get-divisions, fixing the Next
+ link in the User Guide and reducing the chance of other subtle bugs
+ resulting from this stuff.
+
2003-07-02 Shaun McCance <shaunm@wolfram.com>
* yelp-customization.xsl:
diff --git a/stylesheets/yelp-customization.xsl b/stylesheets/yelp-customization.xsl
index d3605578..358690a2 100644
--- a/stylesheets/yelp-customization.xsl
+++ b/stylesheets/yelp-customization.xsl
@@ -591,17 +591,7 @@
<xsl:with-param name="key">TableofContents</xsl:with-param>
</xsl:call-template>
</b></p>
- <xsl:choose>
- <!-- Hackery for the User's Guide, which I don't like -->
- <xsl:when test="(local-name(.) = 'part') and not(@id)">
- <xsl:for-each select="yelp:get-divisions(.)">
- <xsl:apply-templates select="yelp:get-divisions(.)" mode="toc"/>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="yelp:get-divisions(.)" mode="toc"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:apply-templates select="yelp:get-divisions(.)" mode="toc"/>
</div>
<xsl:call-template name="yelp.navbar.bottom">
<xsl:with-param name="node" select="."/>
@@ -611,21 +601,11 @@
</xsl:call-template>
<xsl:comment> End of chunk </xsl:comment>
- <xsl:choose>
- <!-- Hackery for the User's Guide, which I don't like -->
- <xsl:when test="(local-name(.) = 'part') and not(@id)">
- <xsl:for-each select="yelp:get-divisions(yelp:get-divisions(.))">
- <xsl:call-template name="yelp.component.chunk">
- <xsl:with-param name="depth" select="1"/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="yelp.component.chunk">
- <xsl:with-param name="depth" select="0"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:for-each select="yelp:get-divisions(.)">
+ <xsl:call-template name="yelp.component.chunk">
+ <xsl:with-param name="depth" select="1"/>
+ </xsl:call-template>
+ </xsl:for-each>
<xsl:comment> Start of footer </xsl:comment>
</xsl:template>
diff --git a/stylesheets/yelp-functions.xsl b/stylesheets/yelp-functions.xsl
index d3f54c0c..6aaca2e8 100644
--- a/stylesheets/yelp-functions.xsl
+++ b/stylesheets/yelp-functions.xsl
@@ -188,6 +188,12 @@
<func:function name="yelp:get-divisions">
<xsl:param name="node" select="."/>
<xsl:choose>
+ <!-- The id-less part hackery -->
+ <xsl:when test="$node/self::part and not($node/@id)">
+ <func:result select="yelp:get-divisions($node/appendix | $node/chapter | $node/index
+ | $node/glossary | $node/bibliography | $node/article
+ | $node/preface | $node/refentry | $node/reference)"/>
+ </xsl:when>
<xsl:when test="$node/self::appendix | $node/self::chapter
| $node/self::preface">
<func:result select="$node/sect1 | $node/refentry | $node/simplesect