Project

Profile

Help

picture string for format-number() function

Added by Anonymous about 20 years ago

Legacy ID: #2866754 Legacy Poster: sh (sh_9109394)

hi! for a layout for a documentation i'm working with xslt and fop. because of the new functions of xslt2.0 and xpath2.0 i changed the xslt-processor to saxon 8.1.1.. all the code works normal, exept the format-number() in the beginning i start with <xsl:decimal-format name="european" decimal-separator="," grouping-separator="." zero-digit="0" digit="#"/> afterwards i use <xsl:value-of select="format-number(.,'#.##0,##','european')" /> with saxon 6.5.3 and xalan 2.6.0 the comma will displayed if the number have one. e.g.: 0 1,4 10 with saxon 8.1.1 all numbers have a comma e.g.: 0, 1,4 10, i tested it with windows xp and java 1.4.2_06 and suse linux and java 1.4.2_03 are there other documentation about the picture string thanks stefan


Replies (2)

RE: picture string for format-number() functi - Added by Anonymous about 20 years ago

Legacy ID: #2866857 Legacy Poster: Michael Kay (mhkay)

I think that Saxon is behaving as the XSLT 2.0 specification says it should, but your example suggests that the spec should be improved. I'll put forward the suggestion. (format-number() was very poorly specified in XSLT 1.0, if Saxon and Xalan behave the same way then it's probably because they are both calling the same Java library methods). The old implementation remains available in Saxon under the name format-number-1.0() if you need it. Michael Kay

RE: picture string for format-number() functi - Added by Anonymous almost 20 years ago

Legacy ID: #2868275 Legacy Poster: sh (sh_9109394)

hello! thank you for quick response. it works. stefan

    (1-2/2)

    Please register to reply