Table customization in PDF output

71 views
Skip to first unread message

David Goss

unread,
Mar 28, 2014, 1:13:49 PM3/28/14
to dita-o...@googlegroups.com
I'm attempting to customization the output of tables for FO->PDF, using FOP. What I want is this for the top and bottom of the table to have a black border, and for rows in the table to be separated by light gray. Something like this:

------------------------------------------
Header row with solid black top and bottom
------------------------------------------
Body row with gray border
------------------------------------------
Body row with gray border
------------------------------------------
Body row with gray border
------------------------------------------
Last body row with black border at end of table
------------------------------------------

I'm almost getting this. The only problem is that the last row for the table still has the gray border instead of black.

Here is the code that I have in my customization:

  <xsl:variable name="table.frame-default" select="'topbot'"/>

 
<xsl:attribute-set name="table.tgroup">
   
<xsl:attribute name="table-layout">fixed</xsl:attribute>
   
<xsl:attribute name="width">100%</xsl:attribute>
   
<xsl:attribute name="space-before">5pt</xsl:attribute>
   
<xsl:attribute name="space-after">5pt</xsl:attribute>
   
<xsl:attribute name="border-bottom-width">1pt</xsl:attribute>
   
<xsl:attribute name="border-bottom-color">black</xsl:attribute>
   
<xsl:attribute name="border-bottom-style">solid</xsl:attribute>
 
</xsl:attribute-set>

 
<xsl:attribute-set name="tbody.row.entry">
   
<xsl:attribute name="border-bottom-width">1pt</xsl:attribute>
   
<xsl:attribute name="border-bottom-color">#CCCCCC</xsl:attribute>
   
<xsl:attribute name="border-bottom-style">solid</xsl:attribute>
 
</xsl:attribute-set>

I've tried a few variations, but no luck so far. Could someone point me in the direction of the correct attribute set to accomplish this?

Reply all
Reply to author
Forward
0 new messages