Altova Mailing List Archives
>xsl-list Archive Home
>Recent entries
>Thread Prev - RE: [xsl] Format Phone number
[Thread Next]
Re: [xsl] Format Phone number
To: xsl-list@-----.------------.---
Date: 12/21/2009 11:32:00 AM
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@s...> 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 > > > --~------------------------------------------------------------------ > 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@l...> > --~-- > --~------------------------------------------------------------------ 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@l...> --~--
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

