[x3d-public] renewed development of X3D JSON support
John Carlson
yottzumm at gmail.com
Tue Oct 12 01:11:44 PDT 2021
Here's what happens with strict off and my generated schema:
$ bash validate.sh 2>&1 |grep "Successful validation"|wc
3508 10564 442339
3508 successful validations.
$ bash validate.sh 2>&1 |grep "Validation failed"|wc
66 462 8390
66 failed validations. Here are the files. Many we already know. I will
send JSON parse warnings in a separate message. The files I am
processing are from 2018, so I'll try to get a fresh download from X3D
Resources, and rerun. I can also regenerate them from X3DJSONLD if that
would be helpful
$ bash validate.sh 2>&1 |grep "Validation failed"
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/X3dRetreatProtoExercise.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/QuadTreeExamples.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/TestContainerFieldValues.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/ProtoTagDtdDeclarationExamples.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeB.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/CAD/CADPartChildTransformationAlternativeC.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter04Young.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/NancyNativeTags.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter01Jin.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/NancyDiving.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter03Hyun.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter12Sun.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/HAnimModelFootLeft.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/BoxManAnimationPanel.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter06Ga.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/HAnimModelFootRight.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter10Mi.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/DiamondManLOA_1.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/DiamondManLOA_0.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter08Da.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/HAnimModelHandLeft.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/HAnimSpecificationLOA3Illustrated.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/NancyStandShootRifleM24.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter05Ju.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter02Chul.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/HAnimModelHandRight.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter11Min.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/HAnimSpecificationLOA3Invisible.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter09Ru.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/KoreanCharacter07No.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/InterchangableActorsViaDynamicRoutingPrototypes.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/DiamondManLOA_2.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/HAnimSpecificationLOA3Motion.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/BoxMan.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/AllenDuttonBlurryMotion.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/BodyGeometry.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/BallBounce.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/UniversalJoint.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/DoubleHingeJoint.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/SliderJoint.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/CarDemoMain.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/BallJoint.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/MotorJoint.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/BallBounceSimple.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/BounceTrimesh.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/MovingBody.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/SingleHingeJoint.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellModelOctopus.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellModelStar.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellModelDolphin.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellAttributeTexture.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellAttributeEdgeRound.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellModelHand.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellAttributeEdgeVector.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellModelBaby.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellAttributeNumberOfDivisions.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellAttributeVertexRound.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellAttributeFaceFlags.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellAttributeShellType.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/LatticeXvl/XvlShellAttributeAll.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedOriginalEncoding.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedAlternativeEncoding.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/TextureMapping/MultiTextureDesignPattern.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Savage/GroundVehicles/Jeep/Jeep.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/SubWorld.json
0 Ajv 4.0 Validation failed on
/c/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter30Scripts/Figure30_1ScriptSlidingBall.json
On 10/12/21 2:52 AM, John Carlson wrote:
> 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