aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/xhtml
diff options
context:
space:
mode:
authorManuel Canales Esparcia <manuel@linuxfromscratch.org>2004-05-08 14:19:53 +0000
committerManuel Canales Esparcia <manuel@linuxfromscratch.org>2004-05-08 14:19:53 +0000
commitded6dddb89cade026e592cd386790b5b10e6fe00 (patch)
tree3e628a075a59b9ee298376729b44a4151d039c59 /stylesheets/xhtml
parente4bf4c7e72fabd039b21b78313d43ce2138c1e7d (diff)
Updated the stylesheets to their current version.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3529 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/xhtml')
-rw-r--r--stylesheets/xhtml/lfs-admon.xsl47
-rw-r--r--stylesheets/xhtml/lfs-index.xsl21
-rw-r--r--stylesheets/xhtml/lfs-legalnotice.xsl76
-rw-r--r--stylesheets/xhtml/lfs-mixed.xsl39
-rw-r--r--stylesheets/xhtml/lfs-navigational.xsl150
-rw-r--r--stylesheets/xhtml/lfs-titles.xsl80
-rw-r--r--stylesheets/xhtml/lfs-toc.xsl142
7 files changed, 496 insertions, 59 deletions
diff --git a/stylesheets/xhtml/lfs-admon.xsl b/stylesheets/xhtml/lfs-admon.xsl
new file mode 100644
index 000000000..7cf0520f0
--- /dev/null
+++ b/stylesheets/xhtml/lfs-admon.xsl
@@ -0,0 +1,47 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version="1.0">
+
+ <!-- Use graphics in admonitions -->
+ <xsl:param name="admon.graphics" select="1"/>
+ <xsl:param name="admon.graphics.path">../images/</xsl:param>
+ <xsl:param name="admon.graphics.extension" select="'.png'"/>
+
+ <!-- Changing the output tagging -->
+ <xsl:template name="graphical.admonition">
+ <xsl:variable name="admon.type">
+ <xsl:choose>
+ <xsl:when test="local-name(.)='note'">Note</xsl:when>
+ <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
+ <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
+ <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
+ <xsl:when test="local-name(.)='important'">Important</xsl:when>
+ <xsl:otherwise>Note</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <div class="admonition">
+ <div class ="admonhead">
+ <img alt="[{$admon.type}]">
+ <xsl:attribute name="src">
+ <xsl:call-template name="admon.graphic"/>
+ </xsl:attribute>
+ </img>
+ <h3 class="{name(.)}">
+ <xsl:value-of select="$admon.type"/>
+ <xsl:if test="title">
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="title"/>
+ </xsl:if>
+ </h3>
+ </div>
+ <div class="admonbody">
+ <xsl:apply-templates/>
+ </div>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-index.xsl b/stylesheets/xhtml/lfs-index.xsl
index 2405e5586..825378702 100644
--- a/stylesheets/xhtml/lfs-index.xsl
+++ b/stylesheets/xhtml/lfs-index.xsl
@@ -6,24 +6,31 @@
<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
]>
-<!-- Version 0.8.0 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
- <!--Index Stuff-->
-
<!--Filename-->
<xsl:template match="index" mode="recursive-chunk-filename">
<xsl:text>longindex.html</xsl:text>
</xsl:template>
<!--Title-->
+ <xsl:param name="index-title">Index of packages and important installed files</xsl:param>
+
<xsl:template match="index" mode="title.markup">
- <xsl:param name="allow-anchors" select="0"/>
- <xsl:text>Index of packages and important installed files</xsl:text>
+ <xsl:value-of select="$index-title"/>
</xsl:template>
+
+ <xsl:template name="index.titlepage">
+ <div class="titlepage">
+ <h1 class="index">
+ <xsl:value-of select="$index-title"/>
+ </h1>
+ </div>
+ </xsl:template>
<!--Divisions-->
<xsl:template match="indexterm" mode="index-div">
@@ -109,6 +116,7 @@
</xsl:if>
</li>
</xsl:template>
+
<xsl:template match="indexterm" mode="index-secondary">
<xsl:param name="scope" select="."/>
<xsl:variable name="key" select="concat(&primary;, &#34; &#34;,
@@ -173,5 +181,8 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+
+ <!-- Dropping unneeded anchors -->
+ <xsl:template match="indexterm"/>
</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-legalnotice.xsl b/stylesheets/xhtml/lfs-legalnotice.xsl
new file mode 100644
index 000000000..4b43a9f19
--- /dev/null
+++ b/stylesheets/xhtml/lfs-legalnotice.xsl
@@ -0,0 +1,76 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version="1.0">
+
+ <!-- Generating the page -->
+ <xsl:template match="legalnotice" mode="titlepage.mode">
+ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+ <xsl:variable name="filename" select="concat($base.dir, 'prologue/legalnotice.html')"/>
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="title.markup"/>
+ </xsl:variable>
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ <xsl:with-param name="content">
+ <html>
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+ <xsl:call-template name="user.head.content"/>
+ </head>
+ <body>
+ <xsl:call-template name="body.attributes"/>
+ <div class="{local-name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+ <hr/>
+ <div class="navfooter">
+ <ul class="footerlinks">
+ <li>
+ <a accesskey="h">
+ <xsl:attribute name="href">
+ <xsl:text>../index.html</xsl:text>
+ </xsl:attribute>
+ <xsl:text>Home</xsl:text>
+ </a>
+ </li>
+ </ul>
+ </div>
+ </body>
+ </html>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+
+ <!-- Making the link-->
+ <xsl:template match="copyright" mode="titlepage.mode">
+ <p class="{name(.)}">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="'prologue/legalnotice.html'"/>
+ </xsl:attribute>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Copyright'"/>
+ </xsl:call-template>
+ </a>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">copyright</xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="copyright.years">
+ <xsl:with-param name="years" select="year"/>
+ <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
+ <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+ </p>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-mixed.xsl b/stylesheets/xhtml/lfs-mixed.xsl
new file mode 100644
index 000000000..08dc2262f
--- /dev/null
+++ b/stylesheets/xhtml/lfs-mixed.xsl
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version="1.0">
+
+ <xsl:template match="screen">
+ <xsl:choose>
+ <!-- Temporally hack -->
+ <xsl:when test="child::* = userinput">
+ <pre class="{name(.)}">
+ <kbd class="command">
+ <xsl:value-of select="."/>
+ </kbd>
+ </pre>
+ </xsl:when>
+ <!-- This should be fixed in the XML code -->
+ <!--
+ <xsl:when test="contains(text() , 'SBU')">
+ <p class="sbu">
+ <tt>
+ <xsl:value-of select="substring-before(text() , 'R')"/>
+ <br/>
+ <xsl:value-of select="substring-after(text() , 'U')"/>
+ </tt>
+ </p>
+ </xsl:when>
+ -->
+ <xsl:otherwise>
+ <pre class="{name(.)}">
+ <xsl:apply-templates/>
+ </pre>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-navigational.xsl b/stylesheets/xhtml/lfs-navigational.xsl
new file mode 100644
index 000000000..766f2a9ef
--- /dev/null
+++ b/stylesheets/xhtml/lfs-navigational.xsl
@@ -0,0 +1,150 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version="1.0">
+
+ <!-- Dropping the HEAD links -->
+ <xsl:template name="html.head">
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+ <xsl:call-template name="user.head.content"/>
+ </head>
+ </xsl:template>
+
+ <!-- Header Navigation-->
+ <xsl:template name="header.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+ <xsl:variable name="row" select="count($prev) &gt; 0 or (count($up) &gt; 0
+ and generate-id($up) != generate-id($home)) or count($next) &gt; 0"/>
+ <xsl:if test="$row and $home != .">
+ <div class="navheader">
+ <xsl:if test="$home != .">
+ <div class="headertitles">
+ <p>
+ <xsl:apply-templates select="$home" mode="object.title.markup"/>
+ <xsl:text> - </xsl:text>
+ <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
+ </p>
+ <xsl:if test="$up != $home">
+ <p><b>
+ <xsl:apply-templates select="$up" mode="object.title.markup"/>
+ </b></p>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ <div class="headerlinks">
+ <xsl:if test="count($prev)&gt;0 and $prev != $home">
+ <div class='prev'>
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Prev</xsl:text>
+ </a>
+ </div>
+ </xsl:if>
+ <xsl:if test="count($next)&gt;0">
+ <div class='next'>
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Next</xsl:text>
+ </a>
+ </div>
+ </xsl:if>
+ <div class='home'>
+ <a accesskey="h">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Home</xsl:text>
+ </a>
+ </div>
+ </div>
+ </div>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Footer Navigation-->
+ <xsl:template name="footer.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+ <xsl:variable name="row" select="count($prev) &gt; 0 or count($up) &gt; 0
+ or count($next) &gt; 0 or generate-id($home) != generate-id(.)"/>
+ <xsl:if test="$row">
+ <div class="navfooter">
+ <xsl:if test="count($prev)&gt;0 and $prev != $home">
+ <div class='prev'>
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Prev</xsl:text>
+ </a><br/>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="$prev" mode="object.title.markup"/>
+ </div>
+ </xsl:if>
+ <xsl:if test="count($next)&gt;0">
+ <div class='next'>
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Next</xsl:text>
+ </a><br/>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="$next" mode="object.title.markup"/>
+ </div>
+ </xsl:if>
+ <xsl:if test="count($up)&gt;0 and $up != $home">
+ <div class='up'>
+ <a accesskey="u">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Up</xsl:text>
+ </a>
+ <xsl:if test="$home != .">
+ <div class='home'>
+ <a accesskey="h">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Home</xsl:text>
+ </a>
+ </div>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ </div>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-titles.xsl b/stylesheets/xhtml/lfs-titles.xsl
new file mode 100644
index 000000000..ec6c68cfe
--- /dev/null
+++ b/stylesheets/xhtml/lfs-titles.xsl
@@ -0,0 +1,80 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Version 0.9- Manuel Canales Esparcia <macana@lfs-es.org> -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version="1.0">
+
+ <xsl:template name="part.titlepage">
+ <div class="titlepage">
+ <h1 class="{name(.)}">
+ <xsl:value-of select="title"/>
+ </h1>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="chapter.titlepage">
+ <div class="titlepage">
+ <h1 class="{name(.)}">
+ <xsl:value-of select="title"/>
+ </h1>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="preface.titlepage">
+ <div class="titlepage">
+ <h1 class="{name(.)}">
+ <xsl:value-of select="title"/>
+ </h1>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="sect1.titlepage">
+ <xsl:choose>
+ <!-- I should find a better test -->
+ <xsl:when test="position() = 4">
+ <div class="titlepage">
+ <xsl:if test="@id">
+ <a id="{@id}" name="{@id}"/>
+ </xsl:if>
+ <h2 class="{name(.)}">
+ <xsl:value-of select="title"/>
+ </h2>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="titlepage">
+ <h1 class="{name(.)}">
+ <xsl:value-of select="title"/>
+ </h1>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="sect2.titlepage">
+ <xsl:choose>
+ <xsl:when test="string-length(title) = 0"/>
+ <xsl:otherwise>
+ <div class="titlepage">
+ <xsl:if test="@id">
+ <a id="{@id}" name="{@id}"/>
+ </xsl:if>
+ <h3 class="{name(.)}">
+ <xsl:value-of select="title"/>
+ </h3>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="dedication.titlepage">
+ <div class="titlepage">
+ <h2 class="{name(.)}">
+ <xsl:value-of select="title"/>
+ </h2>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/stylesheets/xhtml/lfs-toc.xsl b/stylesheets/xhtml/lfs-toc.xsl
index ff064fd31..56c14820c 100644
--- a/stylesheets/xhtml/lfs-toc.xsl
+++ b/stylesheets/xhtml/lfs-toc.xsl
@@ -1,13 +1,12 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
-<!-- Version 0.8.0 - Manuel Canales Esparcia <macana@lfs-es.org> -->
+<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
-
-
-<!--TOC stuff-->
+
+ <!-- General settings -->
<xsl:param name="generate.toc">
appendix toc
book toc,title,figure,table,example,equation
@@ -29,9 +28,56 @@
<xsl:param name="toc.section.depth">1</xsl:param>
<xsl:param name="toc.max.depth">3</xsl:param>
-
- <!-- Type of list-->
- <xsl:param name="toc.list.type">ul</xsl:param>
+
+ <!-- Making the TOC -->
+ <xsl:template name="make.toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
+ <xsl:if test="$nodes">
+ <div class="toc">
+ <h3>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key">TableofContents</xsl:with-param>
+ </xsl:call-template>
+ </h3>
+ <ul>
+ <xsl:apply-templates select="$nodes" mode="toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </ul>
+ </div>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Making the subtocs -->
+ <xsl:template name="subtoc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+ <xsl:variable name="subtoc">
+ <ul>
+ <xsl:apply-templates mode="toc" select="$nodes">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </ul>
+ </xsl:variable>
+ <xsl:variable name="depth">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="depth.from.context"
+ select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+ <li class="{name(.)}">
+ <xsl:call-template name="toc.line">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+ <xsl:if test="$toc.section.depth &gt; $depth and count($nodes)&gt;0
+ and $toc.max.depth &gt; $depth.from.context">
+ <xsl:copy-of select="$subtoc"/>
+ </xsl:if>
+ </li>
+ </xsl:template>
<!--Adding the h* tags and dropping redundats links-->
<xsl:template name="toc.line">
@@ -40,37 +86,47 @@
<xsl:param name="depth.from.context" select="8"/>
<xsl:choose>
<xsl:when test="local-name(.) = 'sect1'">
- <span>
- <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="context" select="$toc-context"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </a>
- </span>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$toc-context"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+ </a>
</xsl:when>
<xsl:when test="local-name(.) = 'chapter' or local-name(.) = 'preface'">
<h4>
- <span>
- <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </span>
+ <xsl:variable name="label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$label"/>
+ <xsl:if test="$label != ''">
+ <xsl:value-of select="$autotoc.label.separator"/>
+ </xsl:if>
+ <xsl:apply-templates select="." mode="titleabbrev.markup"/>
</h4>
</xsl:when>
<xsl:when test="local-name(.) = 'part'">
<h3>
- <span>
- <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
+ <xsl:variable name="label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$label"/>
+ <xsl:if test="$label != ''">
+ <xsl:value-of select="$autotoc.label.separator"/>
+ </xsl:if>
+ <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+ </h3>
+ </xsl:when>
+ <xsl:otherwise>
+ <h3>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$toc-context"/>
+ </xsl:call-template>
+ </xsl:attribute>
<xsl:variable name="label">
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:variable>
@@ -79,29 +135,7 @@
<xsl:value-of select="$autotoc.label.separator"/>
</xsl:if>
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </span>
- </h3>
- </xsl:when>
- <xsl:otherwise>
- <h3>
- <span>
- <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="context" select="$toc-context"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </a>
- </span>
+ </a>
</h3>
</xsl:otherwise>
</xsl:choose>