Re: Algorithm for merging the pattern facets in a base simpleType with a subtype?

On Apr 19, 2011, at 6:35 PM, Liam R E Quin wrote:

> 
> 
> I don't know if the XSD regular expression language is closed under a
> (putative) "and" operation.  There may not always be a single expression
> to represent the result.

Unlike some constructs which circulate under the name
'regular expressions', the XSD regexes defined by XSD
define regular languages in the technical sense.  (The 
current version of pattern expressions in Perl, by contrast,
define a larger set of languages.)

Since regular languages are closed under intersection,
the result of a logical 'and' of two regexes is a regular
language. And it will have an expression using XSD regular
expressions.

In practice, it's often easier and clearer to use the 
automatic ANDing that occurs between the patterns of
the base type and the patterns of the restriction.

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com 
* http://cmsmcq.com/mib                 
* http://balisage.net
****************************************************************

Received on Friday, 22 April 2011 14:28:20 UTC