[yelp-xsl] db2html-inline: Use kdb to fix DocBook keycap styling



commit 7bbe6624fd58a1a4e90fe70555deac2e8e02bcf1
Author: Shaun McCance <shaunm gnome org>
Date:   Sun Feb 2 16:36:57 2014 -0500

    db2html-inline: Use kdb to fix DocBook keycap styling
    
    I broke this by accident a while ago when I changed Mallard
    to use the kdb element for key elements.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709943

 xslt/docbook/html/db2html-inline.xsl  |   12 ++++++++++++
 xslt/mallard/html/mal2html-inline.xsl |    2 +-
 2 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/xslt/docbook/html/db2html-inline.xsl b/xslt/docbook/html/db2html-inline.xsl
index e98a18e..1a9da57 100644
--- a/xslt/docbook/html/db2html-inline.xsl
+++ b/xslt/docbook/html/db2html-inline.xsl
@@ -663,6 +663,18 @@ FIXME
   </xsl:call-template>
 </xsl:template>
 
+<!-- = keycap % db2html.inline.content.mode = -->
+<xsl:template mode="db2html.inline.content.mode" match="keycap | db:keycap">
+  <kbd>
+    <xsl:if test=". = 'Fn'">
+      <xsl:attribute name="class">
+        <xsl:text>key-Fn</xsl:text>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:apply-templates/>
+  </kbd>
+</xsl:template>
+
 <!-- = keycode = -->
 <xsl:template match="keycode | db:keycode">
   <xsl:call-template name="db2html.inline">
diff --git a/xslt/mallard/html/mal2html-inline.xsl b/xslt/mallard/html/mal2html-inline.xsl
index 865070d..d2212de 100644
--- a/xslt/mallard/html/mal2html-inline.xsl
+++ b/xslt/mallard/html/mal2html-inline.xsl
@@ -219,7 +219,7 @@ an #{xref} or #{href} attribute.
   <xsl:call-template name="mal2html.span"/>
 </xsl:template>
 
-<!-- = keyseq % mal2html.inline.content.mode = -->
+<!-- = key % mal2html.inline.content.mode = -->
 <xsl:template mode="mal2html.inline.content.mode" match="mal:key">
   <kbd>
     <xsl:if test=". = 'Fn'">


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]