Roger Costello
has announced
a tool which, given a value range, will generate the corresponding
regular expression for W3C XML Schema.
W3C XML Schema
provides a simpler way to constrain numeric datatypes into ranges through
"maxInclusive" and "minExclusive" facets; however there are
circumstances where one needs to use regular expressions instead (on non-numeric
datatypes such as unions, or to define numeric datatypes that can belong to
unions of ranges, for instance).
Although
not directly related to XML technologies, the regular expressions generated by
this tool or the simple algorithm described in the package may therefore be of
help when writing W3C XML Schemas.
This tool is written in Java and
available for download
under the GPL open source license.