[XSLT] Format number like 123.456,78 (use comma for decimals and point for thousands)

We use a different notation for numbers. The comma is used for decimals, the point for thousands, like #.###,00. If I use this with format-number in XSL-FO, FOP generates an error. I get an error as well when using XSLT to generate HTML. I wonder whether this is possible at all?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should use something like that I think :

<xsl:decimal-format name="european" decimal-separator=',' grouping-separator='.' />
<xsl:value-of select="format-number(535.2, '#.###,00', 'european')"/>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
grexxAuthor Commented:
Thanks! (The xsl:decimal-format needs to be top level.)
Gertone (Geert Bormans)Information ArchitectCommented:
you need to give the format-number() function a third argument,
which is a string, name of a <xsl:decimal-format> element (top-level)

eg. <xsl:decimal-format name="myDecFormat"  decimal-separator="," grouping-separator="."/>

then format-number(1228.3, '#.###,00', 'myDecFormat')

Gertone (Geert Bormans)Information ArchitectCommented:
ignore my post,
did not see it was answered yet
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.