Link to home
Create AccountLog in
Avatar of piratepatrol
piratepatrolFlag for United States of America

asked on

Number is Getting Turned into Scientific Notation Format

Hey guys,

I have the following short snippet:

<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
      exclude-result-prefixes="ms o x ss"

    <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" omit-xml-declaration="no" standalone="no" indent="yes" doctype-system="schedules.dtd" />

    <xsl:template match="/">
            Hour: <xsl:value-of select="concat('Hello ', boo:hour-ending-for-interval(0700))"/>

    <xsl:function name="boo:hour-ending-for-interval">
        <xsl:param name="interval"/>
        <xsl:variable name="operating_hour">
            <xsl:value-of select="substring($interval, 1, 2)"/>
            <xsl:when test="substring($interval, 3, 2) = '00'">
                <xsl:value-of select="number($operating_hour)"/>
                <xsl:value-of select="$operating_hour + 1"/>


This yields an output of

Hour: Hello 7.1E1

I can't have that scientific notation format in my output.  I notice that when I remove the concat function, it displays the output in non-scientific notation format.  

Any thoughts why concat is screwing up my output?

Thanks so much,

Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of piratepatrol


It works!  Thanks so much, Gertone!