I think I agree with Dale's interpretation of the Cals table spec[1]. It
says that rowsep is "Ignored for the last <row> of the <table>, where the
frame value applies.". It does not say the last row of each tgroup. I think
it is a deficiency in the stylesheet to not output the rowsep for the last
row of a tgroup that is followed by another tgroup. I think because the
stylesheet uses an fo:table for each tgroup that it confuses tgroup with
table in the application of the table frame attribute. Each tgroup should
*not* use the table.frame template blindly.
[1] http://www.oasis-open.org/specs/a502.htm
Bob Stayton
Sagehill Enterprises
[email protected]
----- Original Message -----
From: "Dale Smith" <[email protected]>
To: "Mauritz Jeanson" <[email protected]>
Cc: <[email protected]>
Sent: Friday, February 06, 2009 11:31 AM
Subject: Re: [docbook-apps] No border between multiple tgroups in a single
cals table for fo output.
"Mauritz Jeanson" <[email protected]> writes:
| -----Original Message-----
| From: Dale Smith
|
| The calsTable template in fo/table.xsl has (edited):
|
| <xsl:for-each select="tgroup">
|
| <fo:table xsl:use-attribute-sets="table.table.properties">
| <xsl:call-template name="table.frame"/>
|
| <xsl:if test="following-sibling::tgroup">
| <xsl:attribute name="border-bottom-width">0pt</xsl:attribute>
| <xsl:attribute name="border-bottom-style">none</xsl:attribute>
| </xsl:if>
|
| <xsl:if test="preceding-sibling::tgroup">
| <xsl:attribute name="border-top-width">0pt</xsl:attribute>
| <xsl:attribute name="border-top-style">none</xsl:attribute>
| </xsl:if>
|
| <xsl:apply-templates select="."/>
| </fo:table>
| </xsl:for-each>
|
| I suspect that only *one* of those xsl:if's are needed, not
| both. And
| in fact, commenting out the first xsl:if gives me borders between my
| tgroups.
It's probably not very common, but anyone who wants to style the
border-bottom of a not-last tgroup differently from the border-top of the
last tgroup needs both xsl:ifs.
Commenting out the first xsl:if makes tgroup no 1 use the border values
assigned in the table.frame template, including a border-bottom-style of
"solid" (and this value comes from the table.frame.border.style
attribute-set).
Instead of commenting out, you can change the first xsl:if to use (for
example)
<xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
<xsl:attribute name="border-bottom-style">solid</xsl:attribute>
Hmm. Well, the way the code currently is there will never be any
border at all between tgroups (unless you customize the stylesheet).
And that even if rowsep='1' on the last row a not-last tgroup.
My reading of the rowsep attribute is that it applies to the bottom of
each row, except for the last row in a table (not last row in a
tgroup), where the frame attribute should be used instead.
-Dale
--
Dale P. Smith
[email protected]
216-447-4059 x2018
216-447-8951 FAX
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]