Re: [xsl] auto sizing a column in a table to fit the text

Subject: Re: [xsl] auto sizing a column in a table to fit the text
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 09 Jul 2013 13:36:02 -0400
At 2013-07-08 19:12 -0400, David wrote:
Hi, I am using xsl 1.0 to format an xml file.  I have a six column two row
table and the data in the bottom right cell of that table is longer than the
length of the table.  Is it possible to have that particular cell auto size
or grow to accommodate the text?

If I've understood your question, the answer is "no". Cell widths are fixed for the entire column of a table. Column widths can be specified by the stylesheet, or they can be automatically calculated by the XSL-FO engine, but one row's cell width cannot be different from another row's cell width.


On your part you could introduce multiple columns for the entire table and then span columns differently on each row so that the reader sees what appears to be differently-sized table cells. But this is entirely strategic on your part and not something that can be automatically engaged. You would have to figure out when to span cells and when not to. Behind the ragged cell sizes would have to be a very rigid columnar specification.

I hope knowing the answer helps.

. . . . . . . Ken

--
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/ |
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx |
Google+ profile: https://plus.google.com/116832879756988317389/about |
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal |

Current Thread