Patchwork tables

Post here questions and problems related to editing and publishing DITA content.
Fredrik_Lönn
Posts: 29
Joined: Mon Feb 06, 2017 11:47 am

Patchwork tables

Post by Fredrik_Lönn »

I wonder why my tables sometimes look like patchwork?

It seems that table cell borders of joined cells at the bottom of the table are not quite aligned with the outer frame of the table. It makes the table look like I tried to draw it myself, but didn't manage very good. You can see an example here:

https://goo.gl/photos/gY79mJ7pUJSRH4Vm6

I use DITA-OT and the Apache FOP for publishing.
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Patchwork tables

Post by Radu »

Hi Fredrik,

Do you have a DITA OT PDF customization set up in place? If so, can you test without your customization? Are you using DITA OT 1.8 or 2.x?
I tried to produce some output using a sample table in which I joined two vertical cells (as in your screenshot) using DITA OT 2.x and FOP but I did not reproduce your problem.
Maybe you could also most a small sample DITA table XML structure on which the problem can be reproduced.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Fredrik_Lönn
Posts: 29
Joined: Mon Feb 06, 2017 11:47 am

Re: Patchwork tables

Post by Fredrik_Lönn »

Hi Radu,

You are right. When using the DITA-OT pdf plugin the table looks good. I should be able to pinpoint what I am doing wrong by comparing the tiopic.fo files shouldn't I? Is there a way to edit the topic.fo file and generate a new pdf based on this modified file? It could be an easy way to identify the rotten code.

Best Regards,
Fredrik
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Patchwork tables

Post by Radu »

Hi Fredrik,

Once you open the "topic.fo" in Oxygen, you can use the toolbar "Configure Transformation Scenarios" and you should find a predefined transformation scenario for FO to PDF which you can use for publishing.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Fredrik_Lönn
Posts: 29
Joined: Mon Feb 06, 2017 11:47 am

Re: Patchwork tables

Post by Fredrik_Lönn »

Hi Radu,

I finally had some time to track down what was causing this issue. It turns out that my customized pdf-plugin adds some kind of footer to tables, that is not present in the regular dita-ot plugin. This happens in a template in the tables.xls file. Below is the template and you will see what part I have commented out:

Code: Select all

	<xsl:template match="*[contains(@class, ' topic/tbody ')]" name="topic.tbody">
<!-- FL170512: This node seems to cause patchworklike cells when joining at the last row.
<fo:table-footer xsl:use-attribute-sets="tgroup.tfoot">
<fo:table-row>
<fo:table-cell number-columns-spanned="{../@cols}" />
</fo:table-row>
</fo:table-footer>-->
<fo:table-body xsl:use-attribute-sets="tgroup.tbody">
<xsl:call-template name="commonattributes" />
<xsl:apply-templates />
</fo:table-body>
</xsl:template>
This seems to fix it for me. I based my plugin on plugin generated on the excellent site http://dita-generator.elovirta.com/. I don't know if this is a general issue with those plugins.

Best Regards,
Fredrik
Post Reply