xsl-list
[Top] [All Lists]

Re: [xsl] format-number issue

2012-02-14 09:28:30
Thanks guys. It was helpful. 
It is wired format but the manager want having it in this way ;)
B.R


----- Ursprüngliche Message -----
Von: Michael Kay <mike(_at_)saxonica(_dot_)com>
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Cc: 
Gesendet: 10:36 Dienstag, 14.Februar 2012
Betreff: Re: [xsl] format-number issue

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>