[x3d-public] renewed development of X3D JSON support
John Carlson
yottzumm at gmail.com
Tue Oct 12 00:52:49 PDT 2021
I've put the converted schema through the Ajv 8 validator. Here's what
I've gotten so far, with HelloWorld.json. I don't know if the problem
stems from Ajv or the schema, or the HelloWorld.json. One reason why I
had to take out pattern match was the XML Schema regular expressions
were not the same as the JavaScript regular expressions. I'm not sure
how portable regular expressions are between encodings, in other words.
Any I don't really know what XMLSpy has done. Maybe check documentation
about regexps on Altova's website.
John
~/x3dschema$ node validatex3djson.js
/c/x3d-code/www.web3d.org/x3d/content/examples/HelloWorld.json
Failed JSON parse
/c/x3d-code/www.web3d.org/x3d/content/examples/HelloWorld.json
SyntaxError: Invalid regular expression:
/^([\d\--\.\:A-Z_a-z·À-ÖØ-öø-ͽͿ-ٟ٪-ۯۺ-ߊ-॥॰-ৰ-ੰ-૰-୰-௰---൰--๏๚--༟༪-ဿ၊-ႏႚ--᠏-᥅ᥐ-᧚-᩿--᭚-ᮯᮺ-᰿-ᱏᱚ--‿-⁀⁰-Ⰰ-、-ꘟꘪ-꣏-ꤊ-ꧏ-ꧯꧺ---豈-﷏ﷰ-/:-�𐀀--𑁥𑁰--𑅀-𑇏𑇚--𑑏𑑚----𑜺-𑣟𑣪-𑱚---𝠀--]+)$/:
Invalid escape
at new RegExp (<anonymous>)
at usePattern
(/home/coderextreme/x3dschema/node_modules/ajv/dist/vocabularies/code.js:72:14)
at Object.code
(/home/coderextreme/x3dschema/node_modules/ajv/dist/vocabularies/validation/pattern.js:19:109)
at keywordCode
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:454:13)
at
/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:222:17
at CodeGen.code
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/codegen/index.js:439:13)
at CodeGen.block
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/codegen/index.js:568:18)
at iterateKeywords
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:219:9)
at groupKeywords
(/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:200:13)
at
/home/coderextreme/x3dschema/node_modules/ajv/dist/compile/validate/index.js:192:13
More information about the x3d-public
mailing list