]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: newapi: Avoid table where every row has an cell with 'colspan'
authorPeter Krempa <pkrempa@redhat.com>
Thu, 29 Feb 2024 13:11:57 +0000 (14:11 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 1 Mar 2024 11:51:56 +0000 (12:51 +0100)
The HTML standard requires that a table column must include at least one
row which defines it exclusively, thus having a table where all rows
unite it via 'colspan' is illegal.

Modify the enum value generator to always output the description field
even when it's empty rather than uniting it, as in case when each value
doesn't have a description the generated document would violate the
standard.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
docs/newapi.xsl

index 539e0a4175873dc6e2bdf01f729edd8ab38d2e95..36bb41c8772a55a36c97ac146f2ca0e321a28fb6 100644 (file)
           <tr>
             <td><a id="{@name}"><xsl:value-of select="@name"/></a></td>
             <td><xsl:text> = </xsl:text></td>
+            <td class="enumvalue"><xsl:call-template name="enumvalue"/></td>
             <xsl:choose>
               <xsl:when test="@info != ''">
-                <td class="enumvalue"><xsl:call-template name="enumvalue"/></td>
                 <td>
                   <div class="comment">
                     <xsl:call-template name="dumptext">
                 </td>
               </xsl:when>
               <xsl:otherwise>
-                <td colspan="2" class="enumvalue"><xsl:call-template name="enumvalue"/></td>
+                <td><xsl:comment> </xsl:comment></td>
               </xsl:otherwise>
             </xsl:choose>
           </tr>