<div><div dir="auto">Thanks, Don, I will look more into your patches later, so far, it looks awesome.</div><div dir="auto"><br></div><div dir="auto">I am mostly talking about several SquawLOD examples under Geospatial under Basic. Since you don’t like tons of examples spewed, I just listed one near the the top of the stack trace in the first message.</div><div dir="auto"><br></div><div dir="auto">There was another error (previously not included in this thread) where setRootNode (not addRootNode) in my SquawLOD023.java file somehow got the rootNode containerField overwritten with a children containerField in at least JSON output. The obvious fix to this is to not use setRootNode! I previously noted that I use “set” for the first “child” for an MFNode in Java. Others use “add”. This error needs to be reanalyzed.</div><div dir="auto"><br></div><div dir="auto">You may wish to overwrite your addRootNode with setRootNode to see if you get the same problem, but no need to make work for yourself when this could use more analysis.</div><div dir="auto"><br></div><div dir="auto">But for completeness, you might want to add a test for this. I don’t know yet if your patches have repaired this issue, I will look into both.</div><div dir="auto"><br></div><div dir="auto">I realize that X3DJSAIL may not be able to be built by a casual user; I think I posted a patch to build.xml with the xmlresolver jars (not sure which one fixed it) being added to the classpath of the Transform(er?) Saxon stylesheet processor.</div><div dir="auto"><br></div><div dir="auto">So far, I have made two patches. There may be more.</div><div dir="auto"><br></div><div dir="auto">I’ve also posted to StackOverflow on the Saxon -? argument issue that I ran across on Linux and Windows. This remains commented out.</div><div dir="auto"><br></div><div dir="auto">I have reverted to OpenJDK 17.0.2 for all cases.</div></div><div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 17, 2022 at 9:31 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-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div><p class="MsoNormal">Hi John. I do appreciate your troubleshooting, thanks. As ever, am replying when circumstances permit.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I must admit that after a number of minutes looking at this post and related posts, I am not really sure what error you are reporting, nor what X3D scene snippet caused it.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Let’s start with your subject line first: “Container Field alternate values for Shape. Correct in X3DUOM, incorrect in X3DJSAIL.”<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">When we go into X3dUnifiedObjectModel-4.0.xml on line 35151<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-family:"Courier New""> <ConcreteNode name="Shape"><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <InterfaceDefinition specificationUrl=<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/shape.html#Shape" style="font-family:"Courier New"" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/shape.html#Shape</a><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> appinfo="Shape can appear under any grouping node."><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <componentInfo name="Shape" level="1"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <Inheritance baseType="X3DShapeNode"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""><!--field definitions --><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <containerField default="children" type="<span style="font-family:"Courier New";background-color:aqua">containerFieldChoicesGroupLODShapeTransform</span>"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <ContentModel><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <GroupContentModel name="ChildContentModelCore" minOccurs="0"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <GroupContentModel name="ShapeChildContentModel" minOccurs="0"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> </ContentModel><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> </InterfaceDefinition><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> </ConcreteNode><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""><u style="font-family:"Courier New""></u> <u style="font-family:"Courier New""></u></span></p><p class="MsoNormal">Then line 253<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-family:"Courier New""> <SimpleType name="<span style="font-family:"Courier New";background-color:aqua">containerFieldChoicesGroupLODShapeTransform</span>"<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> baseType="xs:NMTOKEN"<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> appinfo="containerFieldChoicesGroupLODShapeTransform lists the allowed containerField enumeration values for Shape, Transform and LOD nodes: "children" if parent node has abstract type X3DGroupingNode, otherwise "metadata" default."<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> documentation=<a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#containerField" style="font-family:"Courier New"" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#containerField</a>><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <enumeration value="children"<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> appinfo="parent node has abstract type X3DGroupingNode"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <enumeration value="proxy" appinfo="parent node is Collision"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <enumeration value="rootNode" appinfo="parent node is GeoLOD"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <enumeration value="shape" appinfo="parent node is CADFace or CollidableShape"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> <enumeration value="skin" appinfo="parent node is HAnimHumanoid"/><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> </SimpleType><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">These indicate that Shape might be contained by five different parent nodes, with each case described in appinfo, with corresponding field name <span style="font-family:"Courier New"">children</span> or <span style="font-family:"Courier New"">proxy</span> or <span style="font-family:"Courier New"">rootNode</span> or <span style="font-family:"Courier New"">shape</span> or <span style="font-family:"Courier New"">skin</span><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">OK now let’s to into X3DJSAIL Java source and find Shape.java to see if it matches. Lines 33 and 412:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-family:"Courier New"">package org.web3d.x3d.jsail.Shape;<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="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-family:"Courier New""> containerField_ALTERNATE_VALUES = new String[] { "children", "proxy", "shape" }; // type containerFieldChoicesGroupLODShapeTransform<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">So boom: hardest part is accomplished, have isolated a bug. Somehow we are missing “rootNode” and “skin” enumerations from <span style="font-family:"Courier New"">containerField_ALTERNATE_VALUES.<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The comment you listed “TODO once recorded” etc. is found in CreateSceneAccessInterfaceJava.xslt on line 3650.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The code block that erroneously defined the necessary values appears immediately after that. I worked on improving that, with apparent success getting values out of X3DUOM.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Corrected output in Shape.java looks good:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"> <span style="font-family:"Courier New"">containerField_ALTERNATE_VALUES = new String[] { "children", "proxy", "shape", "rootNode", "skin" }; // type containerFieldChoicesGroupLODShapeTransform<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">This correction to properly use X3DUOM likely fixed other hidden errors as well.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Also fixed incorrect field defaults: SFBool default is false, SFVec4f/SFVec4d is 0 0 0 1<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I’d like to post a new release but other problems are occurring in the build tests that I need to resolve first.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Meanwhile have committed all corrections that I have, hopefully that helps you get farther. If you would like an intermediate (not fully tested) x3djsail.4.0 jar update, please let me know.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hope this helps.<u></u><u></u></p><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></div></div><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><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> Saturday, April 16, 2022 11:37 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: Container Field alternate values for Shape. Correct in X3DUOM, incorrect in X3DJSAIL.<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">It appears that this is yet to be addressed in the X3DJSAIL stylesheet <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><!-- TODO once recorded in X3D XML Schema and X3D Object Model, iterate over values and add to array --><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks for looking into/repairing 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 Sun, Apr 17, 2022 at 1: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-left:4.8pt;margin-right:0in;border-left-color:rgb(204,204,204)"><div><p class="MsoNormal">I don't think that containerField_ALTERNATE_VALUES is correct for Shape. This is perhaps related to the other rootNode issue, where rootNode gets overridden by children? <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Look at X3DUOM possibilities for Shape containerFields.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks for looking into this. I'm going to start digging in <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">runone:<br> [echo] Validate C:\x3d-code\<a href="http://www.web3d.org" target="_blank">www.web3d.org</a>\x3d\content\examples\Basic\Geospatial\SquawLOD023.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\Geospatial\SquawLOD023.json<br> [java] org.web3d.x3d.sai.InvalidFieldValueException: Invalid setContainerFieldOverride() value='rootNode', legal values for Shape are containerField_ALTERNATE_VALUES='"children" "proxy" "shape"'<br> [java] at org.web3d.x3d.jsail.X3DConcreteNode.setContainerFieldOverride(X3DConcreteNode.java:401)<br> [java] at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:631)<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 jdk.internal.reflect.GeneratedMethodAccessor60.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 java.base/java.util.Vector.forEach(Vector.java:1365)<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)<u></u><u></u></p></div></div></div></blockquote></div></div></div></div></blockquote></div></div>
</div>