[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Format Phone number

Subject: Re: Format Phone number
From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
Date: Mon, 21 Dec 2009 12:31:43 +0100
Re:  Format Phone number
The javadoc for java.text.DecimalFormat which is explicitly referred
to by the XSLT 1.0 spec contains this paragraph - note the last

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 "#,##,###,####" ==
"######,####" == "##,####,####".

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.

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


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.