Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Validate regular expressions

From: "Michael Kay" <mike@--------.--->
To: "'Sascha Mantscheff'" <922492@---.-->, <xmlschema-dev@--.--->
Date: 12/6/2007 11:37:00 PM
I don't think it's possible to define a regular expression that matches all
regular expressions (and only regular expressions) - that view is based on
some long-forgotten computer-science theory concerned with different classes
of grammar, which others can correct me on if I've got it wrong. (It's
similar to another problem that comes up quite often, verifying that an
attribute holds a valid XPath expression).

XML Schema 1.1 allows assertions on complex types; my hope is that we will
also see them defined for simple types. That doesn't provide the whole
answer because the assertion language (XPath) isn't actually powerful enough
to describe such constraints. But XPath has well-defined extensibility
mechanisms that allow you to escape to procedural languages, and I believe
that this will in time enable you to define arbitrary constraints of this
kind provided the WG is brave enough to allow this power to be unleashed. 

At present, however, it has to be said that there's a strong sentiment
against allowing things that are quite so open-ended and lacking in
interoperability. These arguments are not without merit - if schemas were
computationally complete, would you be able to trust them? My own view,
however, is that we should give users the power they need to handle this
kind of requirement.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of Sascha Mantscheff
> Sent: 06 December 2007 20:37
> To: xmlschema-dev@w...
> Subject: Validate regular expressions
> 
> 
> Is there a method to validate in a schema that an element's 
> or attribute's content is a valid regular expression? (I do 
> not want to test if the content *matches* a regular 
> expression, but if it *is* one.
> Maybe this boils down to a regular expression for regular 
> expressions, but is there another method?)
> 
> Any help welcome.
> s.m.
> 
> 
> 


From noah_mendelsohn@u... Fri Dec 07 02:34:30 2007
Received: from maggie.w3.org ([


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent