colspec width

Tristan
Posts: 30
Joined: Tue Jun 02, 2015 2:01 pm

colspec width

Post by Tristan » Mon Nov 23, 2015 7:17 pm

Hi,

When using the WebHTML transformation:

-When using DITA 1.8
A. if for a table element one or more of the colspec had a width defined the width was in html set on the indivudual TD elements.
B. if for a table element none of the colspecs had a width defined no width was applied to the output.
Result: columns have the width of their content.

-When using DITA 2.X
A. If for a table element one or more of the colspec had a width defined the width is applied to the collspec in percentages for the once not filled in.
B. If for a table element none of the colspecs have a width defined a col element is generated for each column with a percentage width.
Result: all columns being as wide as the most narrow column. example:

Code: Select all

<col style="width:14.285714285714285%" />
Question
It's with Situation B that we mainly have an issue as the default behavior has changed and narrow columns now become as wide as the most wide column. I would assume that when in DITA the colspec has no width attribute set, this would result in a <col style="width:auto" /> (or even no cols at all if not required). I would however not expect a percentage calculation which enforces equal width to columns.

Is this desired behavior or do width attributes need to fill in differently for obtaining columns the width of their content? (in which case we need to rework our dita tables as this change in output does not seem to be backward compatible).

Thanks,

Tristan

Radu
Posts: 6453
Joined: Fri Jul 09, 2004 5:18 pm

Re: colspec width

Post by Radu » Tue Nov 24, 2015 2:48 pm

Hi Tristan,

I agree with your remarks.
Behavior B seems to have been fixed in this issue:

https://github.com/dita-ot/dita-ot/issues/1970

So for example if you download DITA OT 2.2 and try the same thing with it you should get the old behavior back.
But Oxygen comes with DITA OT 2.1.2 which does not incorporate this more recent fix.
Possibly as a best practice you should try to resize all your tables and specify widths for each column.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Tristan
Posts: 30
Joined: Tue Jun 02, 2015 2:01 pm

Re: colspec width

Post by Tristan » Tue Nov 24, 2015 3:38 pm

Hi Radu,

Thanks for the feedback, good to know that it will be fixed.

It's however in the 'but' that the issue can be found for us to fix it structurally (for now).
I'll clean up on output until the switch to 2.2 has been made.

The nice thing about auto size width is that no value needs to be filled in, so we will not start to fill in width values for a few thousand tables.
Part of those tables are also automatically generated so pre-filling width values in those tables would also impact other processes.

Best regards,

Tristan

Post Reply