]> granicus.if.org Git - docbook-dsssl/commitdiff
Add default class="phrase" when role attribute not used for class,
authorBob Stayton <bobs@sagehill.net>
Fri, 7 Oct 2011 18:39:34 +0000 (18:39 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 7 Oct 2011 18:39:34 +0000 (18:39 +0000)
fixing bug #3076510

xsl/html/inline.xsl

index 013bd1b1d646dfcd081b49622d60df96b7f24b0f..c8c3562a56cf2b27f8ba1185dfb2588ca6e98ff8 100644 (file)
   <span>
     <xsl:call-template name="locale.html.attributes"/>
     <!-- We don't want empty @class values, so do not propagate empty @roles -->
-    <xsl:if test="@role and 
-                  normalize-space(@role) != '' and
-                  $phrase.propagates.style != 0">
-      <xsl:apply-templates select="." mode="class.attribute">
-        <xsl:with-param name="class" select="@role"/>
-      </xsl:apply-templates>
-    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="@role and 
+                     normalize-space(@role) != '' and
+                     $phrase.propagates.style != 0">
+        <xsl:apply-templates select="." mode="class.attribute">
+          <xsl:with-param name="class" select="@role"/>
+        </xsl:apply-templates>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="." mode="class.attribute"/>
+      </xsl:otherwise>
+    </xsl:choose>
     <xsl:call-template name="dir"/>
     <xsl:call-template name="anchor"/>
     <xsl:call-template name="simple.xlink">