<div dir="ltr"><div>Everyone is ignoring ~100% of John's messages now.</div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 15, 2022 at 10:37 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:</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" style="overflow-wrap: break-word;"><div class="gmail-m_-8731184594048755755WordSection1"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">We have potential to do exactly the same with JSON and JavaScript, as you know through your impressive efforts.</p></div></div></blockquote><div><br></div><div>Yes, I'd like to address this and DOM Loading into X3DJSAIL the output from X3DJSONLD.java.</div><div><br></div><div>I've made a change to X3DJSAIL that needs to be reviewed before it's checked in.  This was hiding a lot of issues in my Java X3DJSONLD code, essentially making progress impossible.</div><div><br></div><div>Please review and approve this patch, ASIC.  Then I can proceed with adapting X3DJSONLD.java and X3DJSAIL.</div><div><br></div><div>Here's a proposed patch:</div><div><br></div><div>Index: CreateX3dSceneAccessInterfaceJava.xslt<br>===================================================================<br>--- CreateX3dSceneAccessInterfaceJava.xslt      (revision 33087)<br>+++ CreateX3dSceneAccessInterfaceJava.xslt      (working copy)<br>@@ -36529,7 +36529,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 != null && 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><br></div><div>As you can see, I am checking for null before calling contains.  I'm not sure if this is correct, but a lot of errors were being thrown.</div><div><br></div><div>Also in CreateX3dSceneAccessInterfaceJava.xslt, as previously mentioned, this code looks suspicious:</div><div><br></div><div>                System.out.println ("trimmed MFString newValue[" + i + "]=" + newValue[i]); // debug diagnostic<br><br>                // unquote quoted strings before comparison<br>                boolean reduced = false;<br>                if (newValue[i].startsWith("\""))<br>                {<br>                    newValue[i] = newValue[i].substring(1);<br>                    reduced = true;<br>                }<br>                if (newValue[i].endsWith("\"") && !newValue[i].endsWith("\\\""))<br>                {<br>                    newValue[i] = newValue[i].substring(1, newValue[i].length()-1);<br>                    reduced = true;<br>                }<br></div><div><br></div><div><br></div><div>What happens if you strip a character off of the beginning of the MFString twice? Please fix!  I suggest the first parameter to the second substring method be changed from 1 to 0.</div><div><br></div><div>Good luck!</div><div><br></div><div>John</div></div></div>