]> granicus.if.org Git - docbook-dsssl/commitdiff
Work to make HTML and XHTML targets more valid
authorKeith Fahlgren <abdelazer@users.sourceforge.net>
Tue, 27 May 2008 15:54:46 +0000 (15:54 +0000)
committerKeith Fahlgren <abdelazer@users.sourceforge.net>
Tue, 27 May 2008 15:54:46 +0000 (15:54 +0000)
xsl/html/inline.xsl
xsl/html/synop.xsl

index ab745b07e534eb4c5e7fe33456ca54438a5f18b7..f218c17992fa56bb57448c9ace7e3584400f715b 100644 (file)
 <xsl:template match="emphasis">
   <span>
     <xsl:choose>
-      <xsl:when test="@role and $emphasis.propagates.style != 0">
+      <!-- We don't want empty @class values, so do not propagate empty @roles -->
+      <xsl:when test="@role  and
+                      normalize-space(@role) != '' and
+                      $emphasis.propagates.style != 0">
         <xsl:apply-templates select="." mode="class.attribute">
           <xsl:with-param name="class" select="@role"/>
         </xsl:apply-templates>
     <xsl:if test="@lang or @xml:lang">
       <xsl:call-template name="language.attribute"/>
     </xsl:if>
-    <xsl:if test="@role and $phrase.propagates.style != 0">
+    <!-- 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>
index caa3129bbcf126c73abed4b7afb4e1792d29e324..1ac6f88d532a565e287616506249d6ad1470712c 100644 (file)
   <xsl:variable name="snum">
     <xsl:apply-templates select="." mode="synopfragment.number"/>
   </xsl:variable>
-  <p>
+  <!-- You can't introduce another <p> here, because you're 
+       already in a <p> from cmdsynopsis-->
+  <span>
     <xsl:variable name="id">
       <xsl:call-template name="object.id"/>
     </xsl:variable>
     </a>
     <xsl:text> </xsl:text>
     <xsl:apply-templates/>
-  </p>
+  </span>
 </xsl:template>
 
 <xsl:template match="funcsynopsis">
@@ -365,9 +367,9 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
     </xsl:for-each>
   </table>
   <xsl:if test="paramdef">
-    <blockquote class="paramdef-list">
+    <div class="paramdef-list">
       <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
-    </blockquote>
+    </div>
   </xsl:if>
   <div class="funcprototype-spacer">&#160;</div> <!-- hACk: blank div for vertical spacing -->
 </xsl:template>