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
|