]> granicus.if.org Git - docbook-dsssl/commitdiff
Request #585543 (Quickref-style reference ToC)
authorMichael Smith <xmldoc@users.sourceforge.net>
Mon, 25 Oct 2004 11:20:31 +0000 (11:20 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Mon, 25 Oct 2004 11:20:31 +0000 (11:20 +0000)
Wrapped ToC refentrytitle/refname and refpurpose in
span with class values. This makes it possible to style
them using a CSS stylesheet containing something like below.

Implementing tablular look for FO output will have to wait...

div.toc {
  padding-bottom: 20px;
}

div.toc dt, div.toc li {
  clear: both;
}

div.toc span.refentrytitle {
  float: left;
  text-align: left;
}

div.toc span.refpurpose {
  float: right;
  width: 65%;
  text-align: left;
}

hr {
  clear: both;
}

xsl/html/autotoc.xsl

index b3cbb4729d6876f81346d4f3961ba2add86437cf..1005ed1f83f3a3d8e0bf8ea2b54d8e938668f051 100644 (file)
   </xsl:variable>
 
   <xsl:element name="{$toc.listitem.type}">
-    <a>
-      <xsl:attribute name="href">
-        <xsl:call-template name="href.target"/>
-      </xsl:attribute>
-      <xsl:copy-of select="$title"/>
-    </a>
-    <xsl:if test="$annotate.toc != 0">
-      <xsl:text> - </xsl:text>
-      <xsl:value-of select="refnamediv/refpurpose"/>
-    </xsl:if>
+    <span class='refentrytitle'>
+      <a>
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target"/>
+        </xsl:attribute>
+        <xsl:copy-of select="$title"/>
+      </a>
+    </span>
+    <span class='refpurpose'>
+      <xsl:if test="$annotate.toc != 0">
+        <xsl:text> - </xsl:text>
+        <xsl:value-of select="refnamediv/refpurpose"/>
+      </xsl:if>
+    </span>
   </xsl:element>
 </xsl:template>