xsl-list
[Top] [All Lists]

RE: format-number in Saxon 8.5

2005-08-14 15:52:27
A surprisingly basic bug which seems to have lain undetected in a number of
Saxon releases, perhaps because most of the test cases are on floating-point
numbers since that's what XSLT 1.0 supported.

A description of the bug and source fix are at

https://sourceforge.net/tracker/?func=add&group_id=29872&atid=397617

(Note, format-number() is completely rewritten in Saxon 8 to remove the
dependency on the JDK implementation)

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Manfred Staudinger 
[mailto:manfred(_dot_)staudinger(_at_)gmail(_dot_)com] 
Sent: 14 August 2005 14:46
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] format-number in Saxon 8.5

Hi list,
the stylesheet below works fine with Saxon6,
00001
00022
00333
04444
55555
but not with Saxon8
001
0022
0333
04444
55555
Any idea what's wrong with it?
 
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0" 
              xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:variable name="LF" select="'&#xA;'" />
<xsl:template match="/">
      <xsl:value-of select="$LF" />
      <xsl:value-of select="format-number(1,'00000')" />
      <xsl:value-of select="$LF" />
      <xsl:value-of select="format-number(22,'00000')" />
      <xsl:value-of select="$LF" />
      <xsl:value-of select="format-number(333,'00000')" />
      <xsl:value-of select="$LF" />
      <xsl:value-of select="format-number(4444,'00000')" />
      <xsl:value-of select="$LF" />
      <xsl:value-of select="format-number(55555,'00000')" />
</xsl:template>
</xsl:stylesheet>

Manfred

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





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



<Prev in Thread] Current Thread [Next in Thread>