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

Subject: [xsl] XPath to test that a middle name consists of a letter followed by a period and nothing else ?
From: "Costello, Roger L. costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Jun 2016 11:38:49 -0000
Hi Folks,

Here is an example of a valid middle initial:

	<MI>H.</MI>

I need an XPath expression to check that the value of <MI> is an uppercase
letter of the English alphabet followed by a period symbol, and nothing else.

This XPath expression seems to work fine:

	((matches(MI, '[A-Z]\.')) and (string-length(MI) eq 2))

I am wondering if there is a better (simpler, shorter, more robust) XPath
expression?

/Roger

Current Thread