Re: [xsl] format-number issue

Subject: Re: [xsl] format-number issue
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 14 Feb 2012 09:36:28 +0000
On 14/02/2012 07:41, henry human wrote:
Hi guys
I have taxAmount element which has different formats :
a)<TaxAmount>247.09</TaxAmount>
b)<TaxAmount>247.9</TaxAmount>
c)<TaxAmount>24</TaxAmount>
The result shold be : a)0000024709
b)0000002479
c)0000000024


I find it hard to imagine how you arrived at such a weird design, but it looks like

format-number(number(translate(TaxAmount, '.', '')), '0000000000')

Michael Kay
Saxonica

Current Thread