This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
format-number problems with MSXML
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: format-number problems with MSXML
- From: Jonas Nordström <Jonas dot Nordstrom at ei dot sigma dot se>
- Date: Tue, 22 Aug 2000 15:20:20 +0200
- Reply-To: xsl-list at mulberrytech dot com
I receive accountnumbers from an XML file in the format:
<z:row ACCOUNTNO="00123456789012">
I want to format them to something like:
12.345.678.901-2
The numbers can be from 5 to 12 digits long
A regexp would be /\d{1,3}(\d{3}\.)*-\d/ for those of you who like that kind
of stuff ...
my problem is how to use format-number to accomplish this.
I tried
<xsl:value-of select="translate(format-number($accountno div 10,
'#,##0.0),',.', '.-')"/>
and that worked just fine when I used saxon.
But MSXML uses the language settings of the computer (it seems) and doesn't
yet support <xsl:decimal-format>
Does anybody know how to tell MSXML to use a specific format and make the
parser obey you? ;o)
Jonas Nordstrom
Sigma Exallon Information
PS: I use the latest MSXML3 (july)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list