This is probably a bug or "difference" between how Java and the ICU
implement number formatting.  There are a number of differences between how
Java and the ICU behave.  The stylesheet you provided is from our
conformance test suite, and this is one of the tests that Xalan-C++ fails.

You could report a bug to the ICU, giving the the number you're trying to
format, the decimal and grouping separator you're trying to use, and the
format string.  If it gets fixed, we'll get the fix when we upgrade to that
version of the ICU.

Dave



                                                                                       
                  
                      Gangadhar                                                        
                  
                      Bathula                  To:      [EMAIL PROTECTED]       
                  
                      <gbathula@akamai         cc:      (bcc: David N 
Bertoni/CAM/Lotus)                 
                      .com>                    Subject: Problem with format-number in 
the latest Xalan   
                      Sent by:                 C++                                     
                  
                      gbathula@akamai.                                                 
                  
                      com                                                              
                  
                                                                                       
                  
                                                                                       
                  
                      10/18/2001 03:49                                                 
                  
                      PM                                                               
                  
                      Please respond                                                   
                  
                      to xalan-dev                                                     
                  
                                                                                       
                  
                                                                                       
                  



Hi ,

In the following example, format-number is not behaving as expected . I
am using the latest Xalan C++ and ICU.  Do you know any known problems
in formatting numbers in the latest version of Xalan C++ with the latest
version of ICU ?


XML file :
--------
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="numberformat09.xsl"?>
<doc>
</doc>

XSL file :
-------

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">

  <!-- FileName: NUMBERFORMAT09 -->
  <!-- Document: http://www.w3.org/TR/xslt -->
  <!-- DocVersion: 19991116 -->
  <!-- Section: 12.3 -->
  <!-- Creator: David Marston -->
  <!-- Purpose: Test default decimal-format on separator characters,
changing both. -->

<xsl:decimal-format decimal-separator="|" grouping-separator="." />

<xsl:template match="doc">
  <out>
    <xsl:value-of select="format-number(931.4857,'000.000|###')"/>
  </out>
</xsl:template>

</xsl:stylesheet>


Out put :
------
<?xml version="1.0" encoding="UTF-8"?>
<out>931|486|###</out>




THANKS
gb








Reply via email to