]> granicus.if.org Git - docbook-dsssl/commitdiff
Problem:
authorMichael Smith <xmldoc@users.sourceforge.net>
Mon, 6 Aug 2007 10:18:36 +0000 (10:18 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Mon, 6 Aug 2007 10:18:36 +0000 (10:18 +0000)
  Rows in tables with more than 10 rows get sorted into incorrect
  order.
Cause:
  Code in manpages table handler does sorting, using xsl:sort, to
  deal with instances of cells that span multiple rows. But that
  sorting was being done alphabetically rather than numerically --
  the reason being that the default sort method for xsl:sort is
  "text" (alphabetical).
Fix:
  Added @data-type=number to relevant xsl:sort instances in table
  code.

Closes #1763332. Thanks to kesuke.

xsl/manpages/table.xsl

index 6d2d159ee3c6af8e21cdf788c7e454c49cc906ee..5a1bb9d1d2eea61e640333414a8b5ac50eba2866 100644 (file)
     </xsl:for-each>
   </xsl:template>
 
-
   <!-- * ============================================================== -->
   <!-- *    Output the tbl(1)-formatted contents of each cell.            -->
   <!-- * ============================================================== -->
     </xsl:param>
     <xsl:param  name="cell-data-sorted">
       <!-- * Sort the cells so that the dummy cells get put where we -->
-      <!-- * need them in the structure. -->
+      <!-- * need them in the structure. Note that we need to specify -->
+      <!-- * data-type="number" here because the default sorting method -->
+      <!-- * for xsl:sort is "text" (alphabetical). -->
       <xsl:for-each select="exsl:node-set($cell-data-unsorted)/cell">
-        <xsl:sort select="@row"/>
-        <xsl:sort select="@slot"/>
+        <xsl:sort select="@row" data-type="number"/>
+        <xsl:sort select="@slot" data-type="number"/>
         <xsl:copy-of select="."/>
       </xsl:for-each>
     </xsl:param>