Resolution: Description:
========
In Designer is it possible to define regex (regular expressions) in the facets of the XML Schema. The following is required to configure the regex for the facet in a XML Schema:
1). Create a simple XML schema in Designer.
2). Configure the root element as xs:string .
3). Click in the correspondent button to set the facet.
4). Configure the regex in the pattern field.
In the nomenclature of regular expressions, W3C recommendations are followed. These recommendations can be consulted on the W3 website.
XML Schema's pattern facet uses a regular expression language that supports Unicode. It is fully described in XML Schema Part 2. The language is similar to the regular expression language used in the Perl Programming language, although expressions are matched against entire lexical representations rather than user-scoped lexical representations such as line and paragraph.
As the recommendations indicate, a regular expression should be composed from zero or more branches, separated by | characters.
It is not possible to use “|” inside one of the branches. Is it possible to configure “|” to separate main branches of the regular expression, for instance A|B|C. However, is it not possible to configure “|” inside one of the branches or inside parenthesis, for instance, (A|B)C.
Environment: All
References:
========
http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#regexs
http://www.w3.org/TR/xmlschema-0/#regexAppendix