Hi Johan,
I'm not able to duplicate all your problems.  I just tried FOP 1.0 on a table 
that had no frame attribute, and setting just the following params:

<xsl:param name="table.cell.border.style" select="'none'" />
<xsl:param name="default.table.frame" select="'topbot'" />

My results show a table border top and bottom only, and no visible cell 
borders. Does your table have a 'frame' attribute?  If so, then the 
'default.table.frame' param will have no effect, because it is only used when 
there is no @frame attribute. Some XML editors may insert a frame attribute, by 
the way.

I also get the top and bottom table borders repeated at the page breaks because 
the stock 'table.table.properties' attribute set in DocBook XSL 1.76.1 comes 
with one of the conditionality attributes, and FOP 1 supports them.  Not sure 
why just one, but it seems to work sufficiently.  You mentioned version 1.76.2, 
but that does not exist.  It must be either 1.75.2 or 1.76.1.

Your goal of a row border to appear only below the table header will require a 
customization of the 'table.cell.properties'.  Copy that template from 
fo/table.xsl to your customization layer and add something like this:

    <xsl:if test="ancestor::thead and not(following-sibling::row)">
      <xsl:attribute name="border-after-width">0.5pt</xsl:attribute>
      <xsl:attribute name="border-after-style">solid</xsl:attribute>
      <xsl:attribute name="border-after-color">black</xsl:attribute>
    </xsl:if >

If you are using the namespaced stylesheets, then add the d: prefix to thead 
and row in this example.

Bob Stayton
Sagehill Enterprises
[email protected]


  ----- Original Message ----- 
  From: Johan Persson 
  To: [email protected] 
  Sent: Sunday, January 15, 2012 4:25 AM
  Subject: [docbook-apps] Limitations in table border formatting with 
xsltproc+fop ?


  (I'm using xsl-stylesheet v1.76.2 together with xsltproc and fop v1.0)

For printed output I want to get rid of some of the excess borders in the 
default output so I first removed the cell borders with   <xsl:param 
name="table.cell.border.style" select="'none'" />and this works as expected.I 
then tried to frame the table only on the top and bottom with   <xsl:param 
name="default.table.frame" select="'topbot'" />but this has no effect. (I also 
tried the parameter 'table.frame.border.style' )Other settings, such as 
"'none'" doesn't do anything either. Neither does adjusting thickness or color 
of the border either. This makes me believe there are some (known?) limitations 
in the tool chain.Can anyone comment on the errors of my way in styling printed 
output tables?(My end goal is to only have horizontal borders on top and bottom 
and below the table header row)I should also add that the using the attributes 
directly from Bob S. book as below (to have closed frames table at page breaks) 
does not work either<xsl:attribute-set name="table.table.properties">  
<xsl:attribute name="border-after-width.conditionality">retain</xsl:attribute>  
<xsl:attribute 
name="border-before-width.conditionality">retain</xsl:attribute></xsl:attribute-set>
 

Reply via email to