[x3d-public] Member-only: X3D to Unity, Unreal, Blender, glTF
John Carlson
yottzumm at gmail.com
Sat Apr 16 22:59:41 PDT 2022
Everyone is ignoring ~100% of John's messages now.
On Fri, Apr 15, 2022 at 10:37 PM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:
>
>
> We have potential to do exactly the same with JSON and JavaScript, as you
> know through your impressive efforts.
>
Yes, I'd like to address this and DOM Loading into X3DJSAIL the output from
X3DJSONLD.java.
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.
Please review and approve this patch, ASIC. Then I can proceed with
adapting X3DJSONLD.java and X3DJSAIL.
Here's a proposed patch:
Index: CreateX3dSceneAccessInterfaceJava.xslt
===================================================================
--- CreateX3dSceneAccessInterfaceJava.xslt (revision 33087)
+++ CreateX3dSceneAccessInterfaceJava.xslt (working copy)
@@ -36529,7 +36529,7 @@
if
(ite.getCause().toString().contains("java.lang.StackOverflowError"))
continue; // likely problem is regex
checking of large attribute value, defer diagnosis and continue loading
}
- if
(ite.getMessage().contains("java.lang.StackOverflowError"))
+ if (ite != null && ite.getMessage() != null &&
ite.getMessage().contains("java.lang.StackOverflowError"))
continue; // likely problem is regex checking
of large attribute value, defer diagnosis and continue loading
validationResult.append(errorNotice).append("\n");
System.out.println(errorNotice + "\n"); // avoiding System.err due to
redirection difficulties
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.
Also in CreateX3dSceneAccessInterfaceJava.xslt, as previously mentioned,
this code looks suspicious:
System.out.println ("trimmed MFString newValue[" + i + "]="
+ newValue[i]); // debug diagnostic
// unquote quoted strings before comparison
boolean reduced = false;
if (newValue[i].startsWith("\""))
{
newValue[i] = newValue[i].substring(1);
reduced = true;
}
if (newValue[i].endsWith("\"") &&
!newValue[i].endsWith("\\\""))
{
newValue[i] = newValue[i].substring(1,
newValue[i].length()-1);
reduced = true;
}
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.
Good luck!
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220417/8acf85fc/attachment.html>
More information about the x3d-public
mailing list