]> granicus.if.org Git - docbook-dsssl/commitdiff
Add class attributes to inline elements
authorNorman Walsh <ndw@nwalsh.com>
Wed, 22 Jan 2003 14:09:11 +0000 (14:09 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 22 Jan 2003 14:09:11 +0000 (14:09 +0000)
xsl/html/inline.xsl

index 3baffa1630843416dc9c48cfb9a9e8d8794e810d..76b7da0d6699faf20e1752641c87fb670f67a06d 100644 (file)
       </xsl:with-param>
     </xsl:call-template>
   </xsl:param>
-  <xsl:copy-of select="$content"/>
+  <span class="{local-name(.)}"><xsl:copy-of select="$content"/></span>
 </xsl:template>
 
 <xsl:template name="inline.monoseq">
       </xsl:with-param>
     </xsl:call-template>
   </xsl:param>
-  <tt><xsl:copy-of select="$content"/></tt>
+  <tt class="{local-name(.)}"><xsl:copy-of select="$content"/></tt>
 </xsl:template>
 
 <xsl:template name="inline.boldseq">
       <xsl:copy-of select="$content"/>
     </xsl:when>
     <xsl:otherwise>
-      <b><xsl:copy-of select="$content"/></b>
+      <b class="{local-name(.)}"><xsl:copy-of select="$content"/></b>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:param>
-  <i><xsl:copy-of select="$content"/></i>
+  <i class="{local-name(.)}"><xsl:copy-of select="$content"/></i>
 </xsl:template>
 
 <xsl:template name="inline.boldmonoseq">
                          or local-name(../..) = 'example'
                          or local-name(../..) = 'table'
                          or local-name(../..) = 'formalpara')">
-      <tt><xsl:copy-of select="$content"/></tt>
+      <tt class="{local-name(.)}"><xsl:copy-of select="$content"/></tt>
     </xsl:when>
     <xsl:otherwise>
-      <b><tt><xsl:copy-of select="$content"/></tt></b>
+      <b class="{local-name(.)}"><tt><xsl:copy-of select="$content"/></tt></b>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:param>
-  <i><tt><xsl:copy-of select="$content"/></tt></i>
+  <i class="{local-name(.)}"><tt><xsl:copy-of select="$content"/></tt></i>
 </xsl:template>
 
 <xsl:template name="inline.superscriptseq">