-
Notifications
You must be signed in to change notification settings - Fork 403
Description
Using VS Code and an online XSD validator, for example, https://www.liquid-technologies.com/online-xsd-validator, the XSD fails validation with the following error message:
InvalidRegex: Pattern value '^(http://|https://|~/)([\w.,@?^=%&:~+#\-_$!’();]+/)*([\w.,@?^=%&:~+#\-_$!’();]+/?)$|^urn:[a-z0-9][a-z0-9-]{0,31}:[a-z0-9()+,\/\-.:=@;$_!*'%\/?#]+$' is not a valid regular expression. The reported error was: 'This expression is not supported in the current option setting.'.
The problem is on line 3689:
<xs:pattern value="^urn:[a-z0-9][a-z0-9-]{0,31}:[a-z0-9()+,\/\-.:=@;$_!*'%\/?#]+$" />
Through trial and error, I found the problem is the \ escaping the / character. In fact, it in the character set twice. [a-z0-9()+, \/ \-.:=@;$_!*'% \/ ?#]. The following regular expression passes validation.
<xs:pattern value="^urn:[a-z0-9][a-z0-9-]{0,31}:[a-z0-9()+,\-.:=@;$_!*'%/?#]+$" />