This seems relatively simple. I assume the problem is that your data has 233.94- and format-number requires -223.94. I don't know the syntax offhand but there is a method in the xsl to check the last character of the data field. You could just use the value of (if {last character} = "-") for an xsl:choose condition to parse the inv-amt input field, to move the "-" to the front with a concat() function then pass the result into the format-number. (of course it's even easier the way I did it, where the program generating the XML data already formats numbers into text and calculates absolute positioning to print them)
________________________________ From: Steffanina, Jeff [mailto:jeff.steffan...@marriott.com] Sent: Wednesday, September 01, 2010 10:03 AM To: fop-users@xmlgraphics.apache.org Subject: Placing the minus sign(-) to the RIGHT side of the number I am using FOP to produce an invoice in a .PDF. Everything works. However, when a negative number is produced in my right justified table column, the minus sign causes the decimal point to be mis-aligned. I found the "format-number" function and this addresses the problem. Now the issue is that my system generates a negative value in the form of: 233.94- (the minus sign is always to the right of the value) This cannot be changed. When I submit the value to "format-number", it returns a "NaN" error. select="format-number(inv-amt,'##,###.00;#####.00-')" In summary, I need to produce a column of numbers, right justified, some of the values are negative with the minus sign to the right. At the same time, the vertical alignment of the decimal point is required. Any ideas? Thanks. Jeff