<div dir="ltr">Here's some differences in the JSON, again mostly container fields.<div>Indeed, the processed XML does not contain a skin containerField, even though the input JSON does. So perhaps we're not seeing the skin because the DOM document does not contain a skin containerField? Indeed, looking at the intermediate XML produced by X3DJSONLD.js, it appears that the skin containerField is not created! So indeed, Joe's comment about "no skin" is very telling!<br></div><div><br></div><div>So the question is, how do I convert the JSON -skin "containerField"/key into the XML/DOM document? What bug is there in X3DJSONLD.js for HAnim? Where should I put the "shim" which adds the skin?</div><div><br></div><div>This is not the solution so far, I will work on fidelity of converted JSON to XML more.</div><div><br></div><div>John</div><div>$ diff -w JoeKick.json JoeProcessedKick.json <br></div><div>5c5<br>< "@xsd:noNamespaceSchemaLocation":"<a href="https://www.web3d.org/specifications/x3d-4.0.xsd">https://www.web3d.org/specifications/x3d-4.0.xsd</a>",<br>---<br>> "@xsd:noNamespaceSchemaLocation":"<a href="http://www.web3d.org/specifications/x3d-4.0.xsd">http://www.web3d.org/specifications/x3d-4.0.xsd</a>",<br>183c183<br>< "-value":[<br>---<br>> "-metadata":<br>191d190<br>< ]<br>194c193<br>< "-skeleton":[<br>---<br>> "-children":[<br>239c238<br>< "@point":[0,0,0,1.0,0,0,0,1.0,0,0,0,1.0]<br>---<br>> "@point":[0,0,0,1,0,0,0,1,0,0,0,1]<br>1210,1212c1209<br>< }<br>< ],<br>< "-skin":[<br>---<br>> },<br>1253c1250<br>< "@point":[0.0,1.77,0.0,0.0,1.665,0.09,-0.033,1.62,0.087,0.033,1.62,0.087,0.0,1.55,0.097,-0.077,1.64,-0.01,-0.0527,1.58,0.015,0.077,1.64,-0.01,0.0527,1.58,0.015,0.0,1.625,-0.0925,-0.03,1.46,0.035,0.0,1.44,0.03,0.03,1.46,0.035,-0.1135,1.318,0.095,0.1135,1.318,0.095,0.0,1.25,0.113,-0.087,1.19,0.09,-0.093<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 21, 2020 at 3:50 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">I get an XML file from the archives, for example JoeKick.x3d, convert to JSON using X3dToJson.xslt and then convert back to XML using X3DJSONLD. The I used xmldiff.js on the two XML files. I get:<div><br></div><div>$ node ../node/xmldiff.js JoeKick.x3d JoeProcessedKick.x3d<br>================================================================================<br>C:\Users\coderextreme\X3DJSONLD\src\main\node\xmldiff.js JoeKick.x3d JoeProcessedKick.x3d<br>@5 /X3D/$/xsd:noNamespaceSchemaLocation<br>< "<a href="https://www.web3d.org/specifications/x3d-4.0.xsd" target="_blank">https://www.web3d.org/specifications/x3d-4.0.xsd</a>"<br>@6/X3D/Scene/0/Group/0/HAnimHumanoid/0/MetadataSet/0/$/containerField<br>>"metadata"<br>@4 /X3D/Scene/0/Group/0/HAnimHumanoid/0/MetadataSet/0/MetadataString/0/$/containerField<br>< "value"<br>@4 /X3D/Scene/0/Group/0/HAnimHumanoid/0/HAnimJoint/0/$/containerField<br>< "skeleton"<br>@6/X3D/Scene/0/Group/0/HAnimHumanoid/0/HAnimJoint/0/HAnimSegment/0/HAnimSite/0/Transform/0/S<br>hape/0/IndexedLineSet/0/$/containerField<br>>"geometry"<br>@6/X3D/Scene/0/Group/0/HAnimHumanoid/0/HAnimJoint/0/HAnimSegment/0/HAnimSite/0/Transform/0/S<br>hape/0/IndexedLineSet/0/Coordinate/0/$/containerField<br>>"coord"<br>@4 /X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/$/containerField<br>< "skin"<br>@6/X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/Appearance/0/ImageTexture/0/$/containerField<br>>"texture"<br>@6/X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/IndexedFaceSet/0/$/containerField<br>>"geometry"<br>@6/X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/IndexedFaceSet/0/Coordinate/0/$/containerFiel<br>d<br>>"coord"<br>@6/X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/IndexedFaceSet/0/TextureCoordinate/0/$/contai<br>nerField<br>>"texCoord"<br>@6/X3D/Scene/0/Group/4/Transform/0/Shape/0/Appearance/0/ImageTexture/0/$/containerField<br>>"texture"<br>@6/X3D/Scene/0/Group/4/Transform/0/Shape/0/IndexedFaceSet/0/$/containerField<br>>"geometry"<br>@6/X3D/Scene/0/Group/4/Transform/0/Shape/0/IndexedFaceSet/0/Coordinate/0/$/containerField<br>>"coord"<br>@6/X3D/Scene/0/Group/5/Transform/1/Shape/0/IndexedLineSet/0/$/containerField<br>>"geometry"<br>@6/X3D/Scene/0/Group/5/Transform/1/Shape/0/IndexedLineSet/0/Coordinate/0/$/containerField<br>>"coord"<br>@6/X3D/Scene/0/Group/5/Transform/2/Shape/0/IndexedLineSet/0/$/containerField<br>>"geometry"<br>@6/X3D/Scene/0/Group/5/Transform/3/Shape/0/IndexedLineSet/0/$/containerField<br>>"geometry"<br></div><div><br></div><div>Note that most of these are new containerFields, but there are perhaps important differences earlier in the files.</div><div><br></div><div>The only approach that I see might work would be to include mapToMethod.js in the JSON -> XML conversion. One might argue that containerFields may not be required to render XML. One needs to examine how well mapToMethod.js works in general.</div><div><br></div><div>Indeed, how are the JSON files themselves different?</div><div><br></div><div><br></div><div><br></div></div>
</blockquote></div>