[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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 column. 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|