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

"C. M. Sperberg-McQueen" <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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
****************************************************************
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.