Re: numberformatting problem (austrian format)
This worked, Thanks! And sorry for the late reply. Haichao - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
numberformatting problem (austrian format)
I?m using fop to process PDFs. I need to format a number. code: xsl:value-of select=format-number(1, ',###.00') / The output in this case is 10,000.00 My problem is, that I need the number format in Austria, which is 10.000,00 (the comma and the point are switched) I already tried .###,00 but a TransformerException was thrown. Seems that the point is only used to separate integer and decimal places and the comma is only used to group numerals. Anyone knows how I can get the number formatted with the Austrian/German format? - Zuverlässigkeit seit 50 Jahren - Raiffeisen Bausparkasse feiert Jubiläum. Auf zum Bauspar-Jubiläumsgewinnspiel: __ Raiffeisen Bausparkasse Gesellschaft m.b.H., 1050 Wien, Wiedner Hauptstraße 94, Firmenbuchnummer 116309v, Handelsgericht Wien, DVR 0066257, UID ATU15350206 Diese E-Mail kann vertrauliche und geschuetzte Informationen enthalten. Wenn diese E-Mail nicht für Sie bestimmt ist, bitten wir Sie, uns unverzueglich zu informieren und sie zu loeschen. This e-mail message may contain information, which is confidential and protected. If you are not the intended recipient of this message, we ask you to inform us immediately and delete the message afterwards. image/jpeg
RE: numberformatting problem (austrian format)
Try the following (untested): !-The following is a top-level element (i.e., outside of template rules) -- xsl:decimal-format name=aut decimal-separator=, grouping-separator=. / Then in the template rule, use xsl:value-of select=format-number(1, ',###.00', 'aut') / Instead. Eric Amick Systems Engineer II Legislative Computer Systems From: haichao.m...@raibau.at [mailto:haichao.m...@raibau.at] Sent: Tuesday, July 12, 2011 10:21 To: fop-users@xmlgraphics.apache.org Subject: numberformatting problem (austrian format) I'm using fop to process PDFs. I need to format a number. code: xsl:value-of select=format-number(1, ',###.00') / The output in this case is 10,000.00 My problem is, that I need the number format in Austria, which is 10.000,00 (the comma and the point are switched) I already tried .###,00 but a TransformerException was thrown. Seems that the point is only used to separate integer and decimal places and the comma is only used to group numerals. Anyone knows how I can get the number formatted with the Austrian/German format? - Zuverlässigkeit seit 50 Jahren - Raiffeisen Bausparkasse feiert Jubiläum. Auf zum Bauspar-Jubiläumsgewinnspiel: [cid:image001.jpg@01CC4081.3D944DB0]https://www.bausparen.at/eBusiness/rai_template1/314933534010554625-NA-745225230582111526-NA-19-NA.html __ Raiffeisen Bausparkasse Gesellschaft m.b.H., 1050 Wien, Wiedner Hauptstraße 94, Firmenbuchnummer 116309v, Handelsgericht Wien, DVR 0066257, UID ATU15350206 Diese E-Mail kann vertrauliche und geschuetzte Informationen enthalten. Wenn diese E-Mail nicht für Sie bestimmt ist, bitten wir Sie, uns unverzueglich zu informieren und sie zu loeschen. This e-mail message may contain information, which is confidential and protected. If you are not the intended recipient of this message, we ask you to inform us immediately and delete the message afterwards. inline: image001.jpg
Re: numberformatting problem (austrian format)
On 07/12/2011 10:21 AM, haichao.m...@raibau.at wrote: I?m using fop to process PDFs. I need to format a number. code: xsl:value-of select=format-number(1, ',###.00') / The output in this case is 10,000.00 My problem is, that I need the number format in Austria, which is 10.000,00 (the comma and the point are switched) I already tried .###,00 but a TransformerException was thrown. Seems that the point is only used to separate integer and decimal places and the comma is only used to group numerals. Anyone knows how I can get the number formatted with the Austrian/German format? This is not a FOP-specific question. Questions about XSLT should be sent to the XSL list, URL: http://www.mulberrytech.com/xsl/xsl-list/ . You need to use a named decimal format as described in URL: http://www.w3.org/TR/xslt#format-number . ~Chris -- Chris Maden, text nerd URL: http://crism.maden.org/ “Mankind are more disposed to suffer, while evils are sufferable than to right themselves by abolishing the forms to which they are accustomed.” — Thomas Jefferson - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: numberformatting problem (austrian format)
One other thing: If you need all instances of format-number to behave the same, using xsl:decimal-format decimal-separator=, grouping-separator=. / will change the default decimal formatting, and you can then leave off the third argument to format-number(). Eric Amick Systems Engineer II Legislative Computer Systems From: haichao.m...@raibau.at [mailto:haichao.m...@raibau.at] Sent: Tuesday, July 12, 2011 10:21 To: fop-users@xmlgraphics.apache.org Subject: numberformatting problem (austrian format) I'm using fop to process PDFs. I need to format a number. code: xsl:value-of select=format-number(1, ',###.00') / The output in this case is 10,000.00 My problem is, that I need the number format in Austria, which is 10.000,00 (the comma and the point are switched)