Regular expression language type and transfer between schema types

This should cover W3C XML Schema, Relax NG and DTD related problems.
yottzumm
Posts: 1
Joined: Sun Nov 01, 2015 11:05 pm

Regular expression language type and transfer between schema types

Post by yottzumm »

Does XML Schema provide for regular expression patterns language type? Can I use JavaScript regular expressions? I am trying to translate my XSD or RELAXNG to JSON Schema and the regular expressions aren't being transferred. Is there something better than jsonix for creating the JSON schema? We are creating a JSON format and since validation of JSON against XSD is unlikely, we'd like to create a complete JSON schema as possible to start--I don't want to hand code 50000 lInes of JSON schema. Thanks. If you know a better forum, let me know.
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Regular expression language type and transfer between schema types

Post by adrian »

Hi,

XML Schema supports a flavor of regular expressions, but do note that it is slightly different than JavaScript regular expressions and it is quite limited. Read more about it here:
XML Schema Regular Expressions
The specs: http://www.w3.org/TR/xmlschema-2/#regexs

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply