grchiu      2003/01/09 14:53:17

  Added:       test/tests/conf/math math111.xml math111.xsl
               test/tests/conf-gold/math math111.out
  Log:
  New testcase math111 which covers bugzilla 14300.
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/math/math111.xml
  
  Index: math111.xml
  ===================================================================
  <doc>
        <number>0.0</number>
        <number>0.4</number>
        <number>4.0</number>
        <number>0.04</number>
        <number>0.004</number>
        <number>0.0004</number>
        <number>0.0000000000001</number>
        <number>0.0000000000000000000000000001</number>
        <number>0.0000000000001000000000000001</number>
        <number>0.0012</number>
        <number>0.012</number>
  </doc>
  
  
  
  1.1                  xml-xalan/test/tests/conf/math/math111.xsl
  
  Index: math111.xsl
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
  
    <!-- FileName: MATH111 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 4.4 -->
    <!-- Creator: Gordon Chiu -->
    <!-- Purpose: Test of string to number conversion for small (yet still 
representable) decimal numbers. -->
        <xsl:template match="doc">
                <out>
                        <xsl:apply-templates/>
                </out>
        </xsl:template>
        <xsl:template match="number">
                <pos><xsl:value-of select="string(number(.))"/></pos>
                <neg><xsl:value-of select="string(-1 * number(.))"/></neg>
        </xsl:template>
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf-gold/math/math111.out
  
  Index: math111.out
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <out>
        <pos>0</pos><neg>0</neg>
        <pos>0.4</pos><neg>-0.4</neg>
        <pos>4</pos><neg>-4</neg>
        <pos>0.04</pos><neg>-0.04</neg>
        <pos>0.004</pos><neg>-0.004</neg>
        <pos>0.0004</pos><neg>-0.0004</neg>
        <pos>0.0000000000001</pos><neg>-0.0000000000001</neg>
        
<pos>0.0000000000000000000000000001</pos><neg>-0.0000000000000000000000000001</neg>
        
<pos>0.0000000000001000000000000001</pos><neg>-0.0000000000001000000000000001</neg>
        <pos>0.0012</pos><neg>-0.0012</neg>
        <pos>0.012</pos><neg>-0.012</neg>
  </out>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to