[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] format decimal numbers issue


Subject: Re: [xsl] format decimal numbers issue
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Sat, 22 Mar 2008 14:28:29 +0100

Z W wrote:

             <xsl:value-of select="format-number($value,'#,.000 s')" />
     </xsl:template>

[xslt] C:\detail.xsl:153: Fatal Error! Cannot convert string "5.894 s"
to a double

The error message looks odd but the second argument to format-number should be e.. '#,0.000'. The 's' does not belong in there. If you want to output an 's' for seconds then use
<xsl:value-of
select="concat(format-number($value, '#,0.000'), ' s')"/>



--


	Martin Honnen
	http://JavaScript.FAQTs.com/


Current Thread