xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffanina, Jeff" <Jeff.Steffan...@marriott.com>
Subject RE: Placing the minus sign(-) to the RIGHT side of the number
Date Thu, 02 Sep 2010 12:20:00 GMT
Given the nature of my data, I took this approach and everything works



	From: Eric Douglas [mailto:edouglas@blockhouse.com] 
	Sent: Wednesday, September 01, 2010 10:21 AM
	To: fop-users@xmlgraphics.apache.org
	Subject: RE: Placing the minus sign(-) to the RIGHT side of the
	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
	(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)


	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
	I am using FOP to produce an invoice in a .PDF.   Everything
	However, when a negative number is produced in my right
justified table column, the minus sign causes the decimal point to be
	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:
	(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.
	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
	Any ideas?

View raw message