xsl-list
[Top] [All Lists]

Re: [xsl] format-number issue

2012-02-14 03:36:46
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>
--~--

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