GNOME Bugzilla – Bug 62577
format-number ignores decimal-format attributes NaN and Infinity
Last modified: 2009-08-15 18:40:50 UTC
====== stylesheet ====== <?xml version="1.0" encoding="ISO-8859-1" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:decimal-format NaN="myNaN" inifinity="myInfinity" /> <xsl:template match="/"> case 1: <xsl:value-of select="format-number('X', '#.#')"/> <!-- outputs NOT "myNaN" as expected --> case 2: <xsl:value-of select="format-number(10 div 0, '#.#')"/> <!-- outputs NOT "myInfinity" as expected --> </xsl:template> </xsl:stylesheet> ============= end of stylesheet ==================== format-number seems to ignore the attributes "NaN" and "infinity". Stephan
Created attachment 5851 [details] testcase
Of cause "infinity" not "inifinity" but results are the same! Stephan
Created attachment 5854 [details] corrected testcase
Hi, Tom Broyer looked at the bug and fixed it http://cvs.gnome.org/bonsai/cvsquery.cgi?module=libxslt&branch=HEAD&branchtype=match&dir=libxslt&file=&filetype=match&who=tbroyer&whotype=match&sortby=Date&hours=&date=explicit&mindate=10%2F25%2F01+16%3A59&maxdate=10%2F25%2F01+17%3A01&cvsroot=%2Fcvs%2Fgnome so this should be fixed in CVS, and will be in the next release, thanks ! Daniel
Should be fixed in 1.0.6, thanks, Daniel