]> granicus.if.org Git - docbook-dsssl/commitdiff
Turn off body.attributes since HTML5 does not like them.
authorBob Stayton <bobs@sagehill.net>
Wed, 8 Feb 2012 06:03:39 +0000 (06:03 +0000)
committerBob Stayton <bobs@sagehill.net>
Wed, 8 Feb 2012 06:03:39 +0000 (06:03 +0000)
Fix qanda entries in TOC to use <li> instead of <dd>.

xsl/xhtml5/html5-element-mods.xsl

index 0c0813284d761a79dccf7fe8529a475d344800c5..f40edc13d45d64364954abfcdb6add3b0f5d5946 100644 (file)
   </section>
 </xsl:template>
 
-<!-- HTML5: each dt must have a dd -->
+<!-- HTML5: uses <ul> instead of <dl> for TOC -->
 <xsl:template match="question" mode="qandatoc.mode">
   <xsl:variable name="firstch">
     <!-- Use a titleabbrev or title if available -->
     </xsl:choose>
   </xsl:variable>
 
-  <dt>
-    <xsl:apply-templates select="." mode="label.markup"/>
-    <xsl:if test="contains($deflabel,'number') and not(label)">
-      <xsl:apply-templates select="." mode="intralabel.punctuation"/>
-    </xsl:if>
-    <xsl:text> </xsl:text>
+  <li>
     <a>
       <xsl:attribute name="href">
         <xsl:call-template name="href.target">
           <xsl:with-param name="object" select=".."/>
         </xsl:call-template>
       </xsl:attribute>
+      <xsl:apply-templates select="." mode="label.markup"/>
+      <xsl:if test="contains($deflabel,'number') and not(label)">
+        <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+      </xsl:if>
+      <xsl:text> </xsl:text>
       <xsl:value-of select="$firstch"/>
     </a>
-  </dt>
-  <dd>
     <!-- * include nested qandaset/qandaentry in TOC if user wants it -->
 
     <xsl:if test="not($qanda.nested.in.toc = 0)">
       <xsl:apply-templates select="following-sibling::answer" mode="qandatoc.mode"/>
     </xsl:if>
-  </dd>
+  </li>
 </xsl:template>
 
 <xsl:template match="answer" mode="qandatoc.mode">
   </xsl:choose>
 </xsl:template>
 
+<!-- HTML5: no body attributes -->
+<xsl:template name="body.attributes"/>
+
 </xsl:stylesheet>