[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Table columns - fixed span width with underlying "auto

Subject: Table columns - fixed span width with underlying "auto" layout columns
From: "Murray McDonald" <m.mcdonald@xxxxxxxxx>
Date: Wed, 23 Feb 2011 17:01:41 -0500
 Table columns - fixed span width with underlying "auto
I am writing an XSLT to produce XSL-FO.  I am using the RenderX engine.

I have a table with a 5 columns.  The last four columns are columns of
numbers with text headers.  The XSLT can calcuate how wide it would like
each of these columns to be.  The numbers normally represent thousands of
dollars but are sometimes percentages and sometimes are enclosed within
parenthesis to indicate a debit.  The formatting requirement is to "hang"
any trailing close parenthesis or percent charcater (or both) such that the
last digit of each number aligns vertically.  On cells with a rowsep I also
need to include an underline or double-underline but the length of that
underline should only be as wide as the widest numeric entry within the

One possibility might be to break each of these single columns into three
columns. The rightmost column would be to hold ")", "%" or %)" if present,
the fo:block in such a cell would use text-align="left".  The "middle"
column would hold the dollar figure and any open parenthesis; the fo:block
in such a cell would use text-align="right".   If an underline or double
underline is required it would be applied to this "middle" cell only.  The
leftmost column would be empty and would be used to "pad" the total span of
the three cells out to the desired width.  The column headers would span the
three cells.

I don't see anything in the specs that suggest this should work but I've
tested a number of solutions.  The best of these makes the first of the
three coumns the width I desired for all three and does get "minimum" widths
for my two rightmost columns but it expands the total width of the table by
the width of these two columns.

Looking at the FAQ and the archive, the most promising solution I can see it
to use the "InnodataSaxonExtensions" in the XSLT step to measure the text I
am setting and then used fixed table layouts.

If anyone has thoughts or comments on this I would appreciate hearing them.

Thanks very much

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.