grouping-separaor => problems

Pascal Sartoretti <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Solpa
Message-ID <[email protected]>
Hello,

I would like an integer like "123456789" to be formatted as 
"123'456'789" (why? because it is the usual format in Switzerland).

This leads to problems with Mozilla FireFox, as can be seen in the 
following test case:

===== Data file =====

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<data>
    <number>
       123456789
    </number>
</data>

===== XSLT transform =====

<?xml version="1.0"?>
<xsl:stylesheet
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       version="1.0">
    <xsl:decimal-format name="myFormat" grouping-separator="'"/>
    <xsl:template match="/data">
        <HTML>
          <BODY>
             <xsl:value-of select="format-number(number,'###,###,###', 
'myFormat')"/>
          </BODY>
        </HTML>
    </xsl:template>
</xsl:stylesheet>


When loading the data file into FireFox 1.0.6, I get an error:

	Error during XSLT transformation: (null)

The Javascript console also shows an error:

   Error: [Exception... "Node cannot be inserted at the specified point
   in the hierarchy"  code: "3" nsresult: "0x80530003
   (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)"  location:
   "chrome://autofill/content/autofill_overlay.js Line: 257"]
   Source File: chrome://autofill/content/autofill_overlay.js
   Line: 257

I think that the problem probably comes from the fact that I try to use 
a ' as separator, which is a special XML character.

Can somebody help me?

Thanks in advance

Pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.