xsl-list
[Top] [All Lists]

Re: [xsl] format decimal numbers issue

2008-03-22 06:28:54
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--