summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vesik <sander.vesik@sun.com>2002-07-05 22:24:21 +0000
committerSander Vesik <sander@src.gnome.org>2002-07-05 22:24:21 +0000
commit63f4509a271f9a35924b8698352183a617b63842 (patch)
tree167052e0a6713daa59cf90a9a63206e57f805090
parent0f711d77646fc910ced20ec241c421a829a1e45b (diff)
downloadyelp-63f4509a271f9a35924b8698352183a617b63842.tar.gz
stylesheets/yelp-customization.xsl - make <book> support somewhat work
2002-07-25 Sander Vesik <sander.vesik@sun.com> * stylesheets/yelp-customization.xsl - make <book> support somewhat work
-rw-r--r--ChangeLog4
-rw-r--r--stylesheets/yelp-customization.xsl36
2 files changed, 37 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 97f931e0..9616ffd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-07-25 Sander Vesik <sander.vesik@sun.com>
+ * stylesheets/yelp-customization.xsl
+ - make <book> support somewhat work
+
2002-07-05 Sander Vesik <sander.vesik@sun.com>
* stylesheets/yelp-customization.xsl
- rationalize heading styles
diff --git a/stylesheets/yelp-customization.xsl b/stylesheets/yelp-customization.xsl
index 0ff8a78d..0f7a1bfd 100644
--- a/stylesheets/yelp-customization.xsl
+++ b/stylesheets/yelp-customization.xsl
@@ -420,6 +420,9 @@
<xsl:call-template name="component.toc"/>
</xsl:for-each>
</xsl:when>
+ <xsl:when test="local-name(.)='book'">
+ <xsl:call-template name="division.toc"/>
+ </xsl:when>
<xsl:otherwise>
<xsl:call-template name="component.toc"/>
</xsl:otherwise>
@@ -428,6 +431,22 @@
<xsl:call-template name="make.toc.navbar"/>
</xsl:template>
+<xsl:template name="yelp.book.multichunk">
+<xsl:param name="root" select="."/>
+
+<xsl:for-each select="$root/part/chapter">
+ <xsl:comment> Start of chunk: [<xsl:value-of select="@id"/>] </xsl:comment>
+ <xsl:call-template name="yelp.render.toc"/>
+ <xsl:comment> End of chunk </xsl:comment>
+</xsl:for-each>
+
+<xsl:for-each select="$root/chapter">
+ <xsl:comment> Start of chunk: [<xsl:value-of select="@id"/>] </xsl:comment>
+ <xsl:call-template name="yelp.render.toc"/>
+ <xsl:comment> End of chunk </xsl:comment>
+</xsl:for-each>
+</xsl:template>
+
<xsl:template name="yelp.multichunk">
<xsl:param name="type"/>
<xsl:param name="container"/>
@@ -449,7 +468,11 @@
<xsl:comment> End of chunk </xsl:comment>
-<xsl:for-each select="$root/sect1">
+<xsl:if test="$type = 'book'">
+ <xsl:call-template name="yelp.book.multichunk"/>
+</xsl:if>
+
+<xsl:for-each select="//sect1">
<xsl:comment> Start of chunk: [<xsl:value-of select="@id"/>] </xsl:comment>
<xsl:call-template name="article.render.chunk">
<xsl:with-param name="title" select="$container/title"/>
@@ -457,7 +480,7 @@
<xsl:comment> End of chunk </xsl:comment>
</xsl:for-each>
-<xsl:for-each select="$root/sect1/sect2">
+<xsl:for-each select="//sect2">
<xsl:comment> Start of chunk: [<xsl:value-of select="@id"/>] </xsl:comment>
<xsl:call-template name="article.render.chunk">
<xsl:with-param name="title" select="$container/title"/>
@@ -465,7 +488,7 @@
<xsl:comment> End of chunk </xsl:comment>
</xsl:for-each>
-<xsl:for-each select="$root/sect1/sect2/sect3">
+<xsl:for-each select="//sect3">
<xsl:comment> Start of chunk: [<xsl:value-of select="@id"/>] </xsl:comment>
<xsl:call-template name="article.render.chunk">
<xsl:with-param name="title" select="$container/title"/>
@@ -491,6 +514,13 @@
</xsl:call-template>
</xsl:template>
+<xsl:template match="/book">
+<xsl:call-template name="yelp.generic.root">
+ <xsl:with-param name="container" select="."/>
+ <xsl:with-param name="type" select='book'/>
+</xsl:call-template>
+</xsl:template>
+
<xsl:template name="yelp.generic.root">
<xsl:param name="type"/>
<xsl:param name="container"/>