]> granicus.if.org Git - docbook-dsssl/commitdiff
Make footnote rule compatible with html5.
authorBob Stayton <bobs@sagehill.net>
Sat, 12 May 2012 23:39:44 +0000 (23:39 +0000)
committerBob Stayton <bobs@sagehill.net>
Sat, 12 May 2012 23:39:44 +0000 (23:39 +0000)
xsl/html/footnote.xsl

index ae03feb703811e692df9d6e2ce7f3a30dcfddc19..b385c9aa62ff70d1c5da411e83aae865e62307eb 100644 (file)
@@ -250,8 +250,27 @@ linkend/id: <xsl:value-of select="@linkend"/>
   <!-- Only bother to do this if there's at least one non-table footnote -->
   <xsl:if test="count($footnotes)>count($table.footnotes)">
     <div class="footnotes">
+      <xsl:call-template name="footnotes.attributes"/>
       <br/>
-      <hr width="100" align="{$direction.align.start}"/>
+      <hr>
+        <xsl:choose>
+          <xsl:when test="$make.clean.html != 0">
+            <xsl:attribute name="class">footnote-hr</xsl:attribute>
+          </xsl:when>
+          <xsl:when test="$css.decoration != 0">
+            <xsl:attribute name="style">
+              <xsl:value-of select="concat('width:100; align:',
+                                            $direction.align.start,
+                                            ';')"/>
+            </xsl:attribute>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:attribute name="width">100</xsl:attribute>
+            <xsl:attribute name="align"><xsl:value-of 
+                      select="$direction.align.start"/></xsl:attribute>
+          </xsl:otherwise>
+        </xsl:choose>
+      </hr>
       <xsl:apply-templates select="$footnotes" mode="process.footnote.mode"/>
     </div>
   </xsl:if>
@@ -270,6 +289,10 @@ linkend/id: <xsl:value-of select="@linkend"/>
   </xsl:if>
 </xsl:template>
 
+<xsl:template name="footnotes.attributes">
+  <!-- customizable for footnotes attributes -->
+</xsl:template>
+
 <xsl:template name="process.chunk.footnotes">
   <!-- nop -->
 </xsl:template>