[x3d-public] These files failed my modifications of Roy's X3D JSON schema
John Carlson
yottzumm at gmail.com
Tue Mar 30 19:52:20 PDT 2021
These files threw a validation error when run against Roy's schema with
my modifications.
$ grep "^ file" ../x3dschema/results.txt
file:
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/MetadataExamples.json
file:
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/RenderingComponentPrototypes.json
file:
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/ImportExportSyntax.json
file:
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/TestMetadataNodes.json
file:
/c/x3d-code/www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/X3dHeaderPrototypeSyntaxExamples.json
file:
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/MetadataNodeExamples.json
file:
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Scanning/X3dMeshDesignPattern.json
Anyone care to look to see if it's Roy's schema that's the problem, or
the files (look at the last 3 files)? I'm about pooped out for the
evening. I have not run these under Java with Roy's schema yet, but I
will if someone wants me to. Someone could set up org.everit on their
own system, download draft-07 JSON schema (found in x3dschema) and do
the testing with x3d-6.0-JSONSchema.json -- roy's schema (you'll need to
modify the *.java files found in x3dschema--no worries, they're
extremely simple).
To run this test in your own x3dschema folder, do the following patch,
then run bash validate.sh (after modifying per your environment).
Collect errors in results.txt and other txt files. Results are stored
in results3.txt (autogenerated) and results6.txt (roy's schema).
Everything should be checked in now, under
https://github.com/coderextreme/x3dschema
diff --git a/validatex3djson.js b/validatex3djson.js
index bafb455..fcc05ca 100644
--- a/validatex3djson.js
+++ b/validatex3djson.js
@@ -26,7 +26,7 @@ for (var sversion in overallversions) {
function testValid(versions, valids, v, file, ajvValidate, hello) {
// console.log(valids[0], valids[1], v);
// change v == ? and set ? to 0 for my schema reports and set ?
to 1 for roy's schema reports
- if (valids[0] !== valids[1] && v == 0) {
+ if (valids[0] !== valids[1] && v == 1) {
var errs = ajvValidate[versions[v]].errors;
for (var e in errs) {
if (e == 0) {
If the 3 last JSON files are the problem, there's a problem with the
autogenerated schema. I just don't have the heart to look right now.
So I think we're really close to a good X3D JSON schema, we just need to
check these 3 files I think. Then we choose hand-generated (one version)
or auto-generated (separate schemas per version, pretty much auto-update
as X3DUOM is changed).
Thanks,
John
More information about the x3d-public
mailing list