By the way - if anyone is interested in how I solved my problem, it was deceptively simple. I used the built-in format-number function like so:
<xsl:value-of select='format-number(./prev_am, "$###,###.00 ;($###,###.00)")'/> ... <xsl:value-of select='format-number(./current_am, "$###,###.00 ;($###,###.00)")'/> ... <xsl:value-of select='format-number(./paid_am, "($###,###.00); $###,###.00")'/> ... <xsl:value-of select='format-number(./total_am, "$###,###.00 ;($###,###.00)")'/> You'll notice in the formatting string "$###,###.00 ;($###,###.00)" that the first part, which applies only to positive numbers, has a space on the right but before the semi colon (;). This effectively pushes the resultant string to the left, lining it up with negative values. The second part as you may have guessed, applies only to negative numbers. If you're wondering why the ./paid_am uses the opposite format, it's because I need to make it look negative even though the number in the xml is positive. Thanks to everyone again for their help! Mike -----Original Message----- From: Partridge, Michael [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 10:08 AM To: [EMAIL PROTECTED] Subject: RE: lining up amounts w/ and w/o parentheses Wow! Thanks for all the responses on this problem! Clay, I tried your first suggestion - putting the value with extra space at the end inside an inline, but the space was still lost. Jeremias, thanks for your suggestion regarding kerning. I'll be trying that out next. Victor, thank you also for your suggestion of adding a padding column and putting the end paren therein; that will probably be the most robust solution, if not the quickest. And Clay, your last suggestion is also very helpful. Now I just have to decide which is best for me. Thanks again for all the help! Mike -----Original Message----- From: Clay Leeds [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 9:53 AM To: [EMAIL PROTECTED] Subject: Re: lining up amounts w/ and w/o parentheses On 6/7/2003 8:34 AM, Victor Mote wrote: > What you really want here is to align on the decimal point, but according to > http://xml.apache.org/fop/compliance.html#fo-property-text-align > text-align=<string> is not yet supported. The best workaround that I can > think of is to put your trailing ending parentheses into a separate table > cell, which is aligned /left/. You could also put parentheses around *everything* but make the parentheses for positive numbers the same color as your background-color (white if there is no background-color). Of course, it would get more challenging if you alternate the background-color of table-rows, but there are solutions to that as well. Unfortunately, the parentheses would be present in the PDF files if someone were to select and copy the text but if you're just "printing" you're OK. -- Clay Leeds - [EMAIL PROTECTED] Web Developer - Medata, Inc. - http://www.medata.com PGP Public Key: https://mail.medata.com/pgp/cleeds.asc --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
