Hi,
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?
Cheers,
Wendell
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
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
======================================================================
--~------------------------------------------------------------------
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>
--~--