xsl-list
[Top] [All Lists]

[xsl] format decimal numbers issue

2008-03-22 06:16:37
Hi folks

I'm not sure why I'm getting errors when running this.
Is there a workaround to this ?
Any suggestion is appreciated.


<xsl:variable name="tput">
      <xsl:call-template name="display-dec-sec">
               <xsl:with-param name="value" select="$count div
$timeSpan * 1000" />
      </xsl:call-template>
 </xsl:variable>

<td>
       <xsl:call-template name="display-dec-sec">
               <xsl:with-param name="value" select="$tput" />
       </xsl:call-template>
</td>

<xsl:template name="display-dec-sec">
     <xsl:param name="value" />
             <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


Timespan is 1.20329889312E12 - 1.203298892102E12  and count is 6 which
should give 5.893909626719057

--~------------------------------------------------------------------
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>
--~--