diff options
Diffstat (limited to 'xhtml-1_1/autotoc.xsl')
-rw-r--r-- | xhtml-1_1/autotoc.xsl | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/xhtml-1_1/autotoc.xsl b/xhtml-1_1/autotoc.xsl index 8d609a2..3e028bb 100644 --- a/xhtml-1_1/autotoc.xsl +++ b/xhtml-1_1/autotoc.xsl @@ -1,10 +1,7 @@ -<?xml version="1.0" encoding="ASCII"?> -<!--This file was created automatically by html2xhtml--> -<!--from the HTML stylesheets.--> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> +<?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!-- ******************************************************************** - $Id: autotoc.xsl 9295 2012-04-19 19:05:29Z bobstayton $ + $Id: autotoc.xsl 9692 2012-12-16 02:31:34Z dcramer $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -47,7 +44,7 @@ </xsl:when> <xsl:otherwise> <p> - <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"> + <strong> <xsl:call-template name="gentext"> <xsl:with-param name="key">TableofContents</xsl:with-param> </xsl:call-template> @@ -69,6 +66,11 @@ <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="toc.list.attributes"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="toc.title.p" select="$toc.title.p"/> + <xsl:with-param name="nodes" select="$nodes"/> + </xsl:call-template> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> </xsl:call-template> @@ -83,6 +85,11 @@ <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="toc.list.attributes"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="toc.title.p" select="$toc.title.p"/> + <xsl:with-param name="nodes" select="$nodes"/> + </xsl:call-template> <xsl:apply-templates select="$nodes.plus" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -95,6 +102,11 @@ <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="toc.list.attributes"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="toc.title.p" select="$toc.title.p"/> + <xsl:with-param name="nodes" select="$nodes"/> + </xsl:call-template> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -108,6 +120,14 @@ </xsl:choose> </xsl:template> +<xsl:template name="toc.list.attributes"> + <xsl:param name="toc-context" select="."/> + <xsl:param name="toc.title.p" select="true()"/> + <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> + + <xsl:attribute name="class">toc</xsl:attribute> +</xsl:template> + <xsl:template name="make.lots"> <xsl:param name="toc.params" select="''"/> <xsl:param name="toc"/> @@ -540,6 +560,8 @@ <xsl:template name="manual-toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="tocentry"/> + <xsl:param name="toc.title.p" select="true()"/> + <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> <!-- be careful, we don't want to change the current document to the other tree! --> @@ -567,6 +589,11 @@ <xsl:if test="$tocentry/*"> <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="toc.list.attributes"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="toc.title.p" select="$toc.title.p"/> + <xsl:with-param name="nodes" select="$nodes"/> + </xsl:call-template> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> </xsl:call-template> @@ -609,7 +636,7 @@ </xsl:when> <xsl:otherwise> <p> - <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"> + <strong> <xsl:call-template name="gentext"> <xsl:with-param name="key"> <xsl:choose> @@ -671,4 +698,4 @@ <xsl:apply-templates select="." mode="qandatoc.mode"/> </xsl:template> -</xsl:stylesheet> +</xsl:stylesheet>
\ No newline at end of file |