Subject: Re: format decimal numbers issue
From: "Z W" <mpc8250@xxxxxxxxx>
Date: Sat, 22 Mar 2008 06:48:03 -0700
|
Hi Martin
Glad to see you here.
I took your suggestion and tried it and still gets the same error
<xsl:template name="display-dec-sec">
<xsl:param name="value" />
<!-- xsl:value-of select="format-number($value,'#,.000 s')" / -->
<xsl:value-of select="concat(format-number($value, '#,0.000'), ' s')"/>
</xsl:template>
[xslt] C:\detail.xsl:154: Fatal Error! Cannot convert string
"5.894 s" to a double
On Sat, Mar 22, 2008 at 6:28 AM, Martin Honnen <Martin.Honnen@xxxxxx> wrote:
> 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/
|