I realize it has been several months since I broached this subject. As this was a back-burner issue I have only recently revisited this. However, I have not been able to generate the results I had hoped for yet.
I am trying to customize the fo/table.xsl to address the cell.border.color as is the subject here.
My first question is that there seem to be two areas that refer to table.cell.properties, I am assuming the one I want is the 2nd one following the <!-- Expand this template to add properties to any fo:table-cell --> comment.
OK, now from the comment, and some dabbling, should I assume the right approach is to add that structure to my custom layer... or do I want to modify the table.xsl straight away?
The second and biggest problem I am having is that I am not sure what the right 'call' to get the column separators other than black.
My first attempt as illustrated in my first letter:
<xsl:attribute name="border-right">0.5pt white</xsl:attribute>
<xsl:attribute name="border-left">0.5pt white</xsl:attribute>
did not work, but seems like it might be going down the right road.
I have tried something along these lines:
<xsl:call-template name="border">
<xsl:with-param name="table.cell.border.color" select="'white'"/>
</xsl:call-template>
Not to throw more confusion at this with bad code, than necessary. What would be the correct structure to get the the column rules to turn white?
I wonder if you might be able to supply some example of the code to do that?
I hope that is not too much to ask, but it would really help as I have run into a wall here.
Thank you kindly!
/G.
-----Original Message-----
From: Bob Stayton <>
To: docbook-apps <>; Gregorio Pevaco <>
Sent: Thu, Mar 1, 2012 1:55 am
Subject: Re: [docbook-apps] striped table border colors
Hi Gregorio,
Borders within a table are set on table cells, not
on rows. I believe the reason for that must be cell spans, which can put
the bottom of a cell in one row in the next row or several rows.
Customize the template 'table.cell.properties' from
fo/table.xsl to set the custom borders.
Bob Stayton
Sagehill Enterprises
----- Original Message -----
From:
Gregorio Pevaco
To:
Sent: Wednesday, February 29, 2012 2:05
PM
Subject: [docbook-apps] striped table
border colors
Hello:
I have
a particular style of table I am attempting to generate into PDF using the fo
stylesheets.
Specifically I am getting custom striped rows, but I also need to
generate white rowsep/colsep or cell borders. I am trying to do this in my
custom layer, and here is a piece of the xsl:
<xsl:template name="table.row.properties">
<xsl:variable name="tabstyle">
<xsl:call-template name="tabstyle"/>
</xsl:variable>
<xsl:variable name="rownum">
<xsl:number from="tgroup" count="row"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$tabstyle = 'striped'">
<xsl:if test="$rownum mod 2 = 0">
<xsl:attribute
name="background-color">#939598</xsl:attribute>
<!--attributes to change border
colors?-->
<xsl:attribute name="border-right">0.5pt
white</xsl:attribute>
<xsl:attribute name="border-left">0.5pt
white</xsl:attribute>
</xsl:if>
<xsl:if test="$rownum mod 2 != 0">
<xsl:attribute
name="background-color">#bcbec0</xsl:attribute>
<!--?attributes to change border
colors?-->
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:template>
Obviously this is not working, the portions following <!--attributes to change border
colors?--> are simply variations of my attempts to get some sort of
change to the table.cell.properties,
however I could not find any sort of
combination to get the result I wish for, which would be white colored rules
between the cells of the table.
Is this even possible? Any
suggestions?
Thank you for taking the time to read my questions.
/Gregorio