xsl-list
[Top] [All Lists]

Re: [xsl] XPath to test that a middle name consists of a letter followed by a period and nothing else ?

2016-06-02 12:45:23
Agreed: we should answer the OP's question with an appropriate regex (which I think would just be " [a-zA-Z]\.", but I've not tested this in XPath, and leave the details to the experts).

NOT Agreed: this isn't about political correctness, it's about software design correctness. While not directly about XSL/XPath, many discussions veer appropriately into whether a design will meet the desired use case. And forcing a single character middle name -- as has been amply demonstrated in previous posts -- would not even work if your intended audience was upper-middle-class-American-white-males in your 200 home gated community.

These lists are communities of humans -- real people -- and it's entirely appropriate to point out a software design fail, as well as provide explicit XSL/XPath advice.

Just my $0.02,
--R. Lane Fozzard III, BS, MS, MS, LOSA, aka "Rich"

--
Richard Fozzard, Computer Scientist
  Geospatial Metadata: http://www.ngdc.noaa.gov/metadata/emma

Cooperative Institute for Research in Environmental Sciences (CIRES)
Univ. Colorado & NOAA National Centers for Environmental Information
151 Patton Ave, Room 468, Asheville, NC 28801
Office: 828-271-4920 Cell: 303-579-5615, Email: 
richard(_dot_)fozzard(_at_)noaa(_dot_)gov



On 6/2/16 10:39 AM, Tommie Usdin btusdin(_at_)mulberrytech(_dot_)com wrote:
Friends —

This is xls-list, not politically-correct-design-list. It is reasonable
for a participant to ask for help with an XPath test here, and reasonable
to give help with that test.  Discussion of whether this is a test that
should be done for social reasons is out of scope for this list.

If the question had been “how to test that an element contains a letter
followed by a period and nothing else” the OP would have gotten the
needed help without the politics. (While I am certain that Roger is
more than hardy enough to take this off-topic criticism, there are other
participants who would be chased off the list by the reception this
question has received.)

So, can we please return to the XPath part of the question and leave
the business rules out of the discussion?

Thank you.

— Tommie

======================================================================
B. Tommie Usdin                        
mailto:btusdin(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================

--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>