I'm having trouble to get "xsl:decimal-format" to work in combination with format-number, in XSLT.
What I need, is a choice of decimal separator, preferably without having to use the grouping separator.
--> I want my number to look like 4660.32 or 4660,32 depending on somebody's parameters choice.
--> I have defined 2 decimal-format's like this :
<xsl:decimal-format
name='eurokomma'
decimal-separator=','
grouping-separator='.'
/>
<xsl:decimal-format
name='europunt'
decimal-separator='.'
grouping-separator=','
/>
What I get is this :
<xsl:value-of select="format-number(total,'','eurokomma')"/>
gives
4.660,32 which is rather good, except that it contains a grouping separator that I do not want, but have to define since otherwise that defaults to comma as well. (and the result would be 4,660,32)
<xsl:value-of select="format-number(total,'#########.#########','eurokomma')"
gives me
4660 : the decimals have disappeared
<xsl:value-of select="format-number(total,'00000000.00000000','eurokomma')"
gives me
00000000.00004660 : which is totally wrong since the 4660 is now on the wrong side of the decimal sign, and the real decimals have disappeared.
I'm on XDK 9.2.0.4.0, and the problem also existed in 9[i]
Long postings are being truncated to ~1 kB at this time.