xsl-list
[Top] [All Lists]

RE: Creating Fixed-Width Text Data

2003-01-14 13:46:28
That's an idea I hadn't considered. Which is pretty sad, considering I just read it on this list not too long ago.

Thanks Peter,

Mike

From: Peter Van de Water 
<peter(_dot_)vandewater(_at_)salestech(_dot_)co(_dot_)nz>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: "'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'" 
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] Creating Fixed-Width Text Data
Date: Wed, 15 Jan 2003 09:18:40 +1300

You can do it without recursion by calculating $column-width - $text-width
and then using substring on a constant of a whole lot of spaces to get the
right amount of padding. (I build the padding constant with a one-off
recursion but you could just hard code it)

Below is what I'm using to do left, right and centre alignment. Fully
justified is not worth the effort at the moment :-)

Peter
[snip]
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


_________________________________________________________________
MSN 8: advanced junk mail protection and 2 months FREE*. http://join.msn.com/?page=features/junkmail


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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