W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2011

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

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Fri, 22 Apr 2011 08:27:55 -0600
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, xmlschema-dev@w3.org
Message-Id: <A0386C15-D052-4087-BFFC-D6C5397929AF@blackmesatech.com>
To: liam@w3.org

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

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:19 UTC