]> granicus.if.org Git - docbook-dsssl/commitdiff
Added support for top-alignment of cell contents.
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 23 Mar 2006 03:24:16 +0000 (03:24 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 23 Mar 2006 03:24:16 +0000 (03:24 +0000)
xsl/manpages/table.xsl

index 9cf5b21dcb3cf53c1cfc98dcf81dd4b3b232837c..b931769bc612de5ebf87d79154be33f08f2f6a81 100644 (file)
           slot="{$slot}"
           class="{$class}"
           colspan="{@colspan}"
-          align="{@align}">
+          align="{@align}"
+          valign="{@valign}"
+          >
       <xsl:choose>
         <xsl:when test=".//tr">
           <xsl:message
         </xsl:if>
       </xsl:otherwise>
     </xsl:choose>
-    <!--* Select an appropriate key letter based on this cell's attributes. -->
+    <!-- * Select an appropriate "alignment" key letter based on this -->
+    <!-- * cell's attributes. -->
     <xsl:choose>
       <xsl:when test="@type = '^'">
         <xsl:text>^</xsl:text>
         <xsl:text>l</xsl:text>
       </xsl:otherwise>
     </xsl:choose>
+    <!-- * By default, tbl(1) vertically centers cell contents within -->
+    <!-- * their cells; the "t" key latter tells it to top-align the -->
+    <!-- * contents instead. Note that tbl(1) has no options for -->
+    <!-- * bottom or baseline alignment. -->
+    <xsl:if test="@valign = 'top'">
+      <xsl:text>t</xsl:text>
+    </xsl:if>
     <xsl:if test="@class = 'th'">
       <!-- * If this is a heading row, generate a font indicator (B or I), -->
       <!-- * or if the value of $man.table.headings.font is empty, nothing. -->