this is a german Web-Mirror of MHONARC.ORG powered by Domainunion AG

[Top] [All Lists]

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

2013-07-09 12:36:22
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: |
Crane Softwrights Ltd.   |
G. Ken Holman                   mailto:gkholman(_at_)CraneSoftwrights(_dot_)com 
Google+ profile: |
Legal business disclaimers: |

XSL-List info and archive:
To unsubscribe, go to:
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>

<Prev in Thread] Current Thread [Next in Thread>