Subject: Re: [xsl] Format Phone number From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx> Date: Mon, 21 Dec 2009 12:31:43 +0100 |
The javadoc for java.text.DecimalFormat which is explicitly referred to by the XSLT 1.0 spec contains this paragraph - note the last sentence: <quote> The grouping separator is commonly used for thousands, but in some countries it separates ten-thousands. The grouping size is a constant number of digits between the grouping characters, such as 3 for 100,000,000 or 4 for 1,0000,0000. If you supply a pattern with multiple grouping characters, the interval between the last one and the end of the integer is the one that is used. So "#,##,###,####" == "######,####" == "##,####,####". </quote> XSLT 2.0 defines format-number without such a reference, which explains the difference. I'd prefer substring and concatenation functions for creating the 999-999-9999 pattern. -W On Mon, Dec 21, 2009 at 11:36 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote: > > > > > thanks for your response. this is returing me xx-xxxx-xxxx > > format not xxx-xxx-xxxx. > > > > what could be the issue. > > That looks like a bug in your XSLT processor. > > (But this is not the way I would recommend tackling this problem). > > Regards, > > Michael Kay > http://www.saxonica.com/ > http://twitter.com/michaelhkay
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Format Phone number, B Tommie Usdin | Thread | Re: [xsl] Format Phone number, Anil Kumar Veeramall |
Re: [xsl] Format Phone number, Anil Kumar Veeramall | Date | Re: [xsl] Format Phone number, Anil Kumar Veeramall |
Month |