<div dir="ltr"><div dir="auto">Possible issue with X3DJSAIL, GeoLOD.setRootNode (containerField mismatch for Shape DEF='', found containerField='children' but expected containerField='rootNode') compared to GeoLOD.addRootNode (validates).  Reading Javadoc, it says there may be multiple rootNodes, so addRootNode makes sense.</div><div dir="auto"><br></div><div dir="auto">Upon review, there is setRootNode in my Java code, so I'm not sure why there’s an error (above) running it???</div><div dir="auto"><br></div><div dir="auto">I reviewed the output of X3dToJava.xslt--This uses addRootNode.   Should I change setRootNode to addRootNode in my serializers?  It won't be the first time I do something like this.</div><div dir="auto"><br></div><div dir="auto">If I’m doing this solo, ok.   Any clarification why addRootNode validates, but setRootNode doesn't, would help.   But I’m making mistakes in my review, feeling a bit scrambled, wondering.  If there will be no changes to X3DJSAIL, I'll probably have to change my serializers.</div><div dir="auto"><br></div><div dir="auto">I did make a suggestion to use setRootNode to set what goes into the XML output (containerField=“rootNode” on Shape), but it seems like that suggestion has fallen on deaf ears.  That is, we want to bury containerField, but it keeps cropping up.  Can we do something better with X3DJSAIL (and serializers) than subverting the programmer's intention?  </div><div dir="auto"><br></div><div dir="auto">I will take a peek at X3DUOM now.  It looks like the default container Field for shape (which I think is the node in question), is set to "children".  I can't recommend a better default containerField value.</div><div dir="auto"><br></div><div>In my serializers, I think I purposefully use setRootNode on the first child, but I will have to double check.</div><div><br></div><div>It would seem like if the container field has type MFNode, I should use add.</div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 9, 2022 at 7:43 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-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">interesting "issues" while running Java generated by JavaSerializer.js.   Sample attached.<div><br></div><div>Note that the SquawLOD023.x3d.new (intermediate between JSON and Java) does not contain the containerField='rootNode' that the XML file has.  Should I explicitly set the containerField on Shape?</div><div><br></div><div>Note that the .new.json does not contain a containerField either, nor does the JSON generated from XML, that the serializer uses as input.</div><div><br></div><div>Can someone explain why the containerField was supposed to be 'rootNode'?   Can we get the X3dToJson.xslt to produce a rootNode containerField for this case?</div><div><br></div><div><br>I'm guessing this is on a TODO list somewhere.<br><div><br></div><div><br></div><div><br></div><div>~/X3DJSONLD/src/main/java ~/X3DJSONLD/src/main/shell<br>net/coderextreme/x3d_code/www_web3d_org/x3d/content/examples/Basic/Geospatial/SquawLOD023<br>success... containerField mismatch for Shape DEF='', found containerField='children' but expected containerField='rootNode'<br>~/X3DJSONLD/src/main/shell<br>~/X3DJSONLD/src/main/java ~/X3DJSONLD/src/main/shell<br>net/coderextreme/x3d_code/www_web3d_org/x3d/content/examples/Basic/Geospatial/SquawLOD024<br>success... containerField mismatch for Shape DEF='', found containerField='children' but expected containerField='rootNode'<br>~/X3DJSONLD/src/main/shell<br>~/X3DJSONLD/src/main/java ~/X3DJSONLD/src/main/shell<br>net/coderextreme/x3d_code/www_web3d_org/x3d/content/examples/Basic/Geospatial/SquawLOD025<br>success... containerField mismatch for Shape DEF='', found containerField='children' but expected containerField='rootNode'<br>~/X3DJSONLD/src/main/shell<br>~/X3DJSONLD/src/main/java ~/X3DJSONLD/src/main/shell<br>net/coderextreme/x3d_code/www_web3d_org/x3d/content/examples/Basic/Geospatial/SquawLOD026<br>success... containerField mismatch for Shape DEF='', found containerField='children' but expected containerField='rootNode'<br>~/X3DJSONLD/src/main/shell<br>~/X3DJSONLD/src/main/java ~/X3DJSONLD/src/main/shell<br>net/coderextreme/x3d_code/www_web3d_org/x3d/content/examples/Basic/Geospatial/SquawLOD027<br>success... containerField mismatch for Shape DEF='', found containerField='children' but expected containerField='rootNode'<br>~/X3DJSONLD/src/main/shell<br>~/X3DJSONLD/src/main/java ~/X3DJSONLD/src/main/shell<br>net/coderextreme/x3d_code/www_web3d_org/x3d/content/examples/Basic/Geospatial/SquawLOD028<br>success... containerField mismatch for Shape DEF='', found containerField='children' but expected containerField='rootNode'<br>~/X3DJSONLD/src/main/shell<br>~/X3DJSONLD/src/main/java ~/X3DJSONLD/src/main/shell<br>net/coderextreme/x3d_code/www_web3d_org/x3d/content/examples/Basic/Geospatial/SquawLOD029<br>success... containerField mismatch for Shape DEF='', found containerField='children' but expected containerField='rootNode'<br></div></div></div>
</blockquote></div></div>
</div>