[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: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 23 Dec 2009 10:35:05 -0500
RE:  Format Phone number

At 05:40 PM 12/22/2009, was written:
>Which brings us back to Michael's earlier recommendation that you
>don't hard-code any particular national convention regarding how
>phone numbers should be formatted.

Actually, I think it is as unhelpful to insist that all users treat
all applications as if they were in use world wide as to insist that
all users use a local convention.


For users Tommie is right, for good programming practice Dr. Kay has a point. There is a Regular Expression that will validate any North American phone number given in the Perl Cookbook. For a user that might be the end of the discussion. However, a programmer can still commit a meta data error in a web form by requiring both requiring the field content AND validation. An "out of area" bypass checkbox would enable field content OR validation.

Not blaming the user involves some commercial risk, but not a logical dilemma.

Mm, indeed, but the OP asked not how to validate phone numbers but how to format them in XSLT. If he had only said "US phone numbers" (or "numbers according to the North American Numbering Plan") in his query, this entire discussion would have been moot (in the American sense).

So, according to one view at least, the problem arises due not to inadequate analysis but simply inadequate specification -- an easy and common mistake and perhaps not in itself terribly blameworthy. Who are we to know?


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

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.