<div dir="ltr">This patch appears to work for the error:<div><br></div><div>$ svn diff CreateX3dSceneAccessInterfaceJava.xslt<br>Index: CreateX3dSceneAccessInterfaceJava.xslt<br>===================================================================<br>--- CreateX3dSceneAccessInterfaceJava.xslt      (revision 32929)<br>+++ CreateX3dSceneAccessInterfaceJava.xslt      (working copy)<br>@@ -36464,7 +36464,7 @@<br>                             if (ite.getCause().toString().contains("java.lang.StackOverflowError"))<br>                                 continue; // likely problem is regex checking of large attribute value, defer diagnosis and continue loading<br>                                                }<br>-                        if (ite.getMessage().contains("java.lang.StackOverflowError"))<br>+                        if (ite.getMessage() != null && ite.getMessage().contains("java.lang.StackOverflowError"))<br>                             continue; // likely problem is regex checking of large attribute value, defer diagnosis and continue loading<br>                                                validationResult.append(errorNotice).append("\n");<br>                                                System.out.println(errorNotice + "\n"); // avoiding System.err due to redirection difficulties<br></div><div><br></div><div>Attached file to test:</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 17, 2022 at 6:57 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">If we want to work on one thing, this would have the most impact:   See NullPointerException below.  Date on JSON file is 1/27/2022 10PM.  I will work on the "X3D comment replacing" (not sure what's happening there, may have to check for equality).  I will work on a patch to X3DJSAIL.  Attaching JSON.<div><br></div><div>     [echo] Validate C:\x3d-code\<a href="http://www.web3d.org" target="_blank">www.web3d.org</a>\x3d\content\examples\Basic\CAD\CadGeometryExternPrototypes.json with classpath .:/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/jars/X3DJSAIL.4.0.full.jar" target="_blank">www.web3d.org/x3d/stylesheets/java/jars/X3DJSAIL.4.0.full.jar</a><br>     [java] Validating C:\x3d-code\<a href="http://www.web3d.org" target="_blank">www.web3d.org</a>\x3d\content\examples\Basic\CAD\CadGeometryExternPrototypes.json<br>     [java] X3DJSONLD comment replacing "==========================================="<br>     [java] with                         "==========================================="<br>     [java] X3DJSONLD comment replacing "========================================"<br>     [java] with                         "========================================"<br>     [java] X3DJSONLD comment replacing "========================================"<br>     [java] with                         "========================================"<br>     [java] X3DJSONLD comment replacing "========================================"<br>     [java] with                         "========================================"<br>     [java] X3DJSONLD comment replacing "========================================"<br>     [java] with                         "========================================"<br>     [java] X3DJSONLD comment replacing "========================================"<br>     [java] with                         "========================================"<br>     [java] X3DJSONLD comment replacing "========================================"<br>     [java] with                         "========================================"<br>     [java] X3DJSONLD comment replacing "Silence scene warnings by providing ordered ProtoInstance examples. Note warning above that this scene is for developmental use. The ProtoInstance form of the CAD nodes should not be used, native X3D encoding should be used instead."<br>     [java] with                         "Silence scene warnings by providing ordered ProtoInstance examples. Note warning above that this scene is for developmental use. The ProtoInstance form of the CAD nodes should not be used, native X3D encoding should be used instead."<br>     [java] java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because the return value of "java.lang.reflect.InvocationTargetException.getMessage()" is null<br>     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:1590)<br>     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)<br>     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)<br>     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)<br>     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:490)<br>     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:453)<br>     [java]     at Validate.main(Validate.java:18)<br>     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)<br>     [java]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>     [java]     at java.base/java.lang.reflect.Method.invoke(Method.java:568)<br>     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:218)<br>     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:155)<br>     [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:891)<br>     [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:231)<br>     [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)<br>     [java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)<br>     [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)<br>     [java]     at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)<br>     [java]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>     [java]     at java.base/java.lang.reflect.Method.invoke(Method.java:568)<br>     [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)<br>     [java]     at org.apache.tools.ant.Task.perform(Task.java:350)<br>     [java]     at org.apache.tools.ant.Target.execute(Target.java:449)<br>     [java]     at org.apache.tools.ant.Target.performTasks(Target.java:470)<br>     [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)<br>     [java]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)<br>     [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1264)<br>     [java]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)<br>     [java]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)<br>     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)<br>     [java]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>     [java]     at java.base/java.lang.reflect.Method.invoke(Method.java:568)<br>     [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)<br>     [java]     at org.apache.tools.ant.Task.perform(Task.java:350)<br>     [java]     at java.base/java.util.Vector.forEach(Vector.java:1359)<br>     [java]     at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)<br>     [java]     at net.sf.antcontrib.logic.ForEach.executeSequential(ForEach.java:178)<br>     [java]     at net.sf.antcontrib.logic.ForEach.execute(ForEach.java:254)<br>     [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)<br>     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)<br>     [java]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>     [java]     at java.base/java.lang.reflect.Method.invoke(Method.java:568)<br>     [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)<br>     [java]     at org.apache.tools.ant.Task.perform(Task.java:350)<br>     [java]     at org.apache.tools.ant.Target.execute(Target.java:449)<br>     [java]     at org.apache.tools.ant.Target.performTasks(Target.java:470)<br>     [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)<br>     [java]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)<br>     [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1264)<br>     [java]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)<br>     [java]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)<br>     [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)<br>     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)<br>     [java]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>     [java]     at java.base/java.lang.reflect.Method.invoke(Method.java:568)<br>     [java]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)<br>     [java]     at org.apache.tools.ant.Task.perform(Task.java:350)<br>     [java]     at org.apache.tools.ant.Target.execute(Target.java:449)<br>     [java]     at org.apache.tools.ant.Target.performTasks(Target.java:470)<br>     [java]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)<br>     [java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1374)<br>     [java]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)<br>     [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1264)<br>     [java]     at org.apache.tools.ant.Main.runBuild(Main.java:818)<br>     [java]     at org.apache.tools.ant.Main.startAnt(Main.java:223)<br>     [java]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)<br>     [java]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 17, 2022 at 6:21 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I am trying to push X3D JSON through standardization without JSON schema.  This has been a goal for some time now.  I realize I need to collaborate.</div><div dir="auto"><br></div><div dir="auto">Thanks for the vote.</div><div dir="auto"><br></div><div dir="auto">I would like to collaborate with you on getting you a better way of validating X3D JSON, since you want to stay with Java.</div><div dir="auto"><br></div><div dir="auto">That is what I worked on with ticket #18.</div><div dir="auto"><br></div><div dir="auto">I will put up a log on my website after cake.</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 17, 2022 at 6:03 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div><p class="MsoNormal">You already have my vote John – step 4, otherwise premature.  Not sure what you are hoping to accomplish.<u></u><u></u></p></div></div><div lang="EN-US"><div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u style="font-family:"Courier New""></u> <u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- <u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" style="font-family:"Courier New"" target="_blank">brutzman@nps.edu</a><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" style="font-family:"Courier New"" target="_blank">faculty.nps.edu/brutzman</a><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(225,225,225)"><p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Thursday, February 17, 2022 3:44 PM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br><b>Subject:</b> Re: X3D JSON Schema: NOT NEEDED ANY MORE! actually yes needed by Web3D, YMMV<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div style="border:1pt solid rgb(0,70,121);padding:2pt"><p class="MsoNormal" style="line-height:12pt;background-color:rgb(0,70,121)"><span style="font-size:10pt;color:yellow">NPS WARNING: *external sender* verify before acting.<u></u><u></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">Does anyone want me to create XML schema from X3DUOM and Python?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Yes or No?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">John<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Thu, Feb 17, 2022 at 5:36 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<u></u><u></u></p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in;border-left-color:rgb(204,204,204)"><div><div><p class="MsoNormal">Please see “XML” on the chart<u></u><u></u></p></div></div><div><div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" style="font-family:"Courier New"" target="_blank">brutzman@nps.edu</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" style="font-family:"Courier New"" target="_blank">faculty.nps.edu/brutzman</a></span><u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p><div><div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(225,225,225)"><p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Thursday, February 17, 2022 3:11 PM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br><b>Cc:</b> X3D Graphics member mailing list <<a href="mailto:x3d@web3d.org" target="_blank">x3d@web3d.org</a>><br><b>Subject:</b> Re: X3D JSON Schema: NOT NEEDED ANY MORE! actually yes needed by Web3D, YMMV<u></u><u></u></p></div></div><p class="MsoNormal"> <u></u><u></u></p><div style="border:1pt solid rgb(0,70,121);padding:2pt"><p class="MsoNormal" style="line-height:12pt;background-color:rgb(0,70,121)"><span style="font-size:10pt;color:yellow">NPS WARNING: *external sender* verify before acting.</span><u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">I have to laugh, Don.  I don’t see XML schema on the referenced .png below.  Maybe my vision is bad?<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">On Thu, Feb 17, 2022 at 12:04 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<u></u><u></u></p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)"><div><div><p class="MsoNormal">Hi John.  This would have been good to bring up Monday when I called you for weekly discussion.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">There is nothing wrong with any of the new directions you are thinking about… go go go… but the huge variety of possible external applications using X3D, such as those you are listing, are each a worthy task for others to pursue.  They are not a specific task for Web3D standardization.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Validation of X3D content in JSON provides independent confidence to browser implementers and model authors and end users.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">JSON Schema is informational part of future specification, and also crucial because it validates correctness of content.  Since JSON Schema is an IETF draft, and Internet Engineering Task Force (IETF) is another Standards Development Organization (SDO), Web3D Consortium and International Standards Organization can formally reference.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">If anyone has questions about what is planned for standardization, please see the following consensus diagram which describes Web3D and ISO intentions in complete detail.  Pretty detailed, reflecting X3D interoperability.  Questions always welcome.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><ul type="disc"><li>X3D Graphics Standards Relationships<u></u><u></u></li><li><a href="https://www.web3d.org/specifications/X3dSpecificationRelationships.png" target="_blank">https://www.web3d.org/specifications/X3dSpecificationRelationships.png</a><u></u><u></u></li></ul><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Our specific shared tasks regarding JSON Schema remain straightforward and unchanged:<u></u><u></u></p><ol start="1" type="a"><li>Keep tuning your version<u></u><u></u></li><li>Automate testing using Java/Ant invocation for X3D Examples Archives<u></u><u></u></li><li>Adjust your schema, or X3dToJson example versions to achieve correct validation<u></u><u></u></li><li>Autogenerate a match to your schema using X3DUOM for strict correctness/repeatability throughout<u></u><u></u></li><li>Add as informative annex to forthcoming ISO/IEC 19776-5 X3D JSON specification<u></u><u></u></li></ol><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">These steps follow our proven success with XML and ClassicVRML and Turtle encodings, as well as Java and Python programming languages.  They are also the same pattern we will follow for X3D in Python, C, C++ and C#.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">May I respectfully suggest that our group doing those specifications and implementations well provides the best possible path to encourage all of the other dozens of possibilities that you describe.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Onward we go, have fun with valid X3D!   8)<u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" style="font-family:"Courier New"" target="_blank">brutzman@nps.edu</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" style="font-family:"Courier New"" target="_blank">faculty.nps.edu/brutzman</a></span><u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p><div><div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(225,225,225)"><p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Wednesday, February 16, 2022 12:25 AM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br><b>Cc:</b> X3D Graphics member mailing list <<a href="mailto:x3d@web3d.org" target="_blank">x3d@web3d.org</a>><br><b>Subject:</b> X3D JSON Schema: NOT NEEDED ANY MORE!<u></u><u></u></p></div></div><div><div><p class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p><p class="MsoNormal">Suggestion, read only the last paragraph.   That’s my member confidential information.   Please don’t share the last paragraph.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Don,<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I have been working to get typesafe (way beyond schema) JSON into various packages. I have developed X3DJSONLD.java which loads a DOM document, which can then be loaded and validated using X3DJSAIL.   This Java code has not really been accepted into the X3DJSAIL libraries.   I can help you write a way to validate JSON with X3DJSAIL.   Which you can plug into ant.  Would this help with the acceptance of X3D JSON by the Web3d community?  It’s pretty much a very simple task at this stage of maturity.   I’m waiting for you to get on board!  Just search some my node examples on sourceforge for X3DJSONLD and convert to Java!  Simple!  I probably even have a Java example!<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Recent efforts include creating x3dinput.py, the beginnings of a JSON loader for x3d.py, and x3djsonld.py which produces typesafe python.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Well?  We don’t need no stinking JSON schema!   I know I have not been advertising the above projects much.   Do you see the value in them, that they are the replacement for JSON Schema?<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">JSON schema is only a low barrier of protection, for products that don’t validate XML.  That is, a website like X3DJSONLD.   While I still try to keep the site working, to show the value and feasibility of X3D JSON in legacy libraries, it has not been my top priority. I have been only updating JSON schema based on changes requested by you!<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I appreciate Roy’s work on X3D JSON Schema for the working draft and to debug the primary way (only?) to get as fast as possible from XML to JSON, namely: X3dToJson.xslt.   Thank you for making X3D JSON possible, Roy and Don!<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I suggest we make JSON validation, with our own pre-existing code libraries, a top priority for our JSON efforts.  NOT PRODUCING JSON SCHEMA DOCUMENTATION!  I didn’t want to do that!   I will very rapidly delete such documentation because it is pretty useless!   Can you believe how much time has been wasted going from draft07 to draft2020-12.   Only to produce broken Java and slow python validators?   What was the value proposition for draft2020-12?<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">No, I don’t want to create yet another SAI for JavaScript!   ES6 or TypeScript, maybe!  C/C++/C#?   What’s wrong with Coin3D and FreeWRL?<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">What’s the likelihood of Babylon Native and  Three.js Native?   I think that PlayCanvas is already targeting smartphones.   And Unity and   Unreal are targeting the web.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Where does X3D fit in the above? Can we really afford to compete at a low-level library level?  Would a declarative level above all these libraries be more successful?  What are PROTOs for and why aren’t we standardizing them?<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">What if there was something that generated code for all of the popular game engines? A 4D compiler of sorts.   What if I could write JSON and target all 4D engines?   All animation libraries?  Wouldn’t that be the JPEG of 4D?   What is the Open Inventor for today?   If you want to help me write JSON Schema or X3DUOM for that, you are welcome!  glTF is a compiler target, not a competitor.   If you’re interested, send me a note.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">John<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">On Tue, Feb 15, 2022 at 11:59 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)"><div><p class="MsoNormal">TL;DR<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Understood that you want to pursue a Java course.   Would running JavaScript inside Java be acceptable?   Running against a 4000+ example archive is a challenge, and below is my collected wisdom.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Python solutions for draft2020-12 are as slow as molasses.   I suggest we step backwards to draft07 if we pursue a python solution.   Then we can use the fastjsonschema package.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Ajv is a very fast solution and is my go to solution for JSON schema validation.   It is my most common approach for validating the sourceforge archive and Savage.   Ajv supports most of the draft JSON standards.   Ajv solicits funds for support with my encouragement.  I am just a happy customer!<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Draft07 has the advantage of providing many, many implementations across a variety of languages.   We will probably not see that much maturity for many years for any potential upcoming standard.  I thought we had a good Java solution with Everit and Draft07, but you were wary of it.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thus, my solution for most people would be to allow them to validate one JSON document at a time, probably with python or JavaScript at this point.   I will continue to support the x3dschema and x3dvalidate projects for projects with a lot of files, or even one-offs with x3dvalidate.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I am working to enhance the JSON schema client/server solution, but running Ajv as is done currently on the browser will require running JavaScript interpreter on the client.   If running something like CEF (headless chrome) is acceptable, we can work on that.   But if you’re running Chrome, why not Node.js/V8/Deno?   There are alternatives to npm.   With Deno, security comes by default, and you know which websites you are downloading modules from, pretty much like the web.  Npm is deprecated with Deno.   Deno also supports TypeScript natively.   These take many question marks out of the equation for running TypeScript and JavaScript.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">There’s commercial solutions with XMLSpy.   If XMLSpy provided production validators for a license fee less than their editors, that would be greatly appreciated.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">I will monitor the jsonschemafriend Java project until it reaches a mature solution for draft2020-12.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">It seems like there’s room for a JSON schema to Java compiler in the mix.   I’m not sure why we haven’t seen this?<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">John<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">On Tue, Feb 15, 2022 at 10:27 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<u></u><u></u></p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)"><div><div><p class="MsoNormal">John, I can replace the schema in the official repository, but we still have a severe difficulty in that there is no build process to check it against X3D Examples scenes.  As ever, using Java latest and Ant build tasks will be the path to mainstreaming.  We have been blocked by that for several years, and JSON Schema is still in draft status.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Don’t want to sound discouraging, seems like you are close, but these are the final hurdles to get past.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Recent update found on json schema page indicates that they are still draft and still progressing.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><ul type="disc"><li class="MsoNormal"><a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fjson-schema.org%2F&data=04%7C01%7Cbrutzman%40nps.edu%7Ca120d58cdefc4bf71be408d9f26f6009%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637807382560352259%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=W0k09Zc54brQ4ET571DbNhJ8m5wROu5HY2SNXbvwLXw%3D&reserved=0" target="_blank">http://json-schema.org</a><u></u><u></u></li></ul><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" style="font-family:"Courier New"" target="_blank">brutzman@nps.edu</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" style="font-family:"Courier New"" target="_blank">faculty.nps.edu/brutzman</a></span><u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p><div><div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(225,225,225)"><p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Wednesday, February 9, 2022 10:43 PM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>; X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br><b>Subject:</b> Re: [x3d-public] X3D JSON Schema updated for axis++ defaults<u></u><u></u></p></div></div><p class="MsoNormal"> <u></u><u></u></p><div style="border:1pt solid rgb(0,70,121);padding:2pt"><p class="MsoNormal" style="line-height:12pt;background-color:rgb(0,70,121)"><span style="font-size:10pt;color:yellow">NPS WARNING: *external sender* verify before acting.</span><u></u><u></u></p></div></div></div><div><div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">See attached JSON schema to get #comment next to USE (practically everywhere in the schema).  Shortened versions of the schema welcome.  I'm not quite sure what to do. <u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">This adds about 3660 lines to the schema.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">If you can suggest a better JSON encoding or X3D JSON schema, that would be welcome at this point.<u></u><u></u></p></div></div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">On Thu, Feb 10, 2022 at 12:29 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)"><div><div><p class="MsoNormal">Please confirm that you want me to accept @USE with sibling -children fields, as shown in recently mentioned Trebuchet.json.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">See below snippet of X3D JSON schema, that I will add back in *many* places.  The code to be added is embolden.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thanks!<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">John<u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">On Sat, Feb 5, 2022 at 9:06 AM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<u></u><u></u></p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)"><div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal" style="margin-bottom:12pt">2. Saw a documentation problem:  USE nodes can’t indicate anything besides the @USE value (except for containerField value for relevant parent-child relationship in XML encoding).  So your following guidance about comments is not portable outside of JSON.<u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">    "RigidBody": {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">      "type": "object",</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">      "oneOf": [</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">        {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          "type": "object",</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          "properties": {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            "@class": {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">              "type": "string"</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            },</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            "@USE": {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">              "type": "string"</span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">            },</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">            "-children": {</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">              "type": "array",</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">              "minItems": 1,</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">              "items": {</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                "type": "object",</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                "properties": {</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                  "#comment": {</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                    "type": "string",</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                    "$comment": "#comment statements are the only allowed in -children node when using a USE field"</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                  }</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                },</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                "additionalProperties": false</span></b><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">              }</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            }</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">         },</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          "required": [</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            "@USE"</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          ],</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          "additionalProperties": false</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">        },</span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div><p class="MsoNormal">_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><u></u><u></u></p></blockquote></div></div></blockquote></div></div></div></div></blockquote></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div></div>
</blockquote></div>
</blockquote></div>