[x3d-public] Comparing Joe*.* XML files

John Carlson yottzumm at gmail.com
Sat Nov 21 14:29:53 PST 2020


Here's some differences in the JSON, again mostly container fields.
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!

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?

This is not the solution so far, I will work on fidelity of converted JSON
to XML more.

John
$ diff -w JoeKick.json JoeProcessedKick.json
5c5
<     "@xsd:noNamespaceSchemaLocation":"
https://www.web3d.org/specifications/x3d-4.0.xsd",
---
>     "@xsd:noNamespaceSchemaLocation":"
http://www.web3d.org/specifications/x3d-4.0.xsd",
183c183
<                           "-value":[
---
>                           "-metadata":
191d190
<                           ]
194c193
<                     "-skeleton":[
---
>                     "-children":[
239c238
<
"@point":[0,0,0,1.0,0,0,0,1.0,0,0,0,1.0]
---
>
"@point":[0,0,0,1,0,0,0,1,0,0,0,1]
1210,1212c1209
<                       }
<                     ],
<                     "-skin":[
---
>                       },
1253c1250
<
"@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

On Sat, Nov 21, 2020 at 3:50 PM John Carlson <yottzumm at gmail.com> wrote:

> 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:
>
> $ node ../node/xmldiff.js JoeKick.x3d JoeProcessedKick.x3d
>
> ================================================================================
> C:\Users\coderextreme\X3DJSONLD\src\main\node\xmldiff.js JoeKick.x3d
> JoeProcessedKick.x3d
> @5 /X3D/$/xsd:noNamespaceSchemaLocation
> < "https://www.web3d.org/specifications/x3d-4.0.xsd"
> @6/X3D/Scene/0/Group/0/HAnimHumanoid/0/MetadataSet/0/$/containerField
> >"metadata"
> @4
> /X3D/Scene/0/Group/0/HAnimHumanoid/0/MetadataSet/0/MetadataString/0/$/containerField
> < "value"
> @4 /X3D/Scene/0/Group/0/HAnimHumanoid/0/HAnimJoint/0/$/containerField
> < "skeleton"
>
> @6/X3D/Scene/0/Group/0/HAnimHumanoid/0/HAnimJoint/0/HAnimSegment/0/HAnimSite/0/Transform/0/S
> hape/0/IndexedLineSet/0/$/containerField
> >"geometry"
>
> @6/X3D/Scene/0/Group/0/HAnimHumanoid/0/HAnimJoint/0/HAnimSegment/0/HAnimSite/0/Transform/0/S
> hape/0/IndexedLineSet/0/Coordinate/0/$/containerField
> >"coord"
> @4 /X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/$/containerField
> < "skin"
>
> @6/X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/Appearance/0/ImageTexture/0/$/containerField
> >"texture"
>
> @6/X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/IndexedFaceSet/0/$/containerField
> >"geometry"
>
> @6/X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/IndexedFaceSet/0/Coordinate/0/$/containerFiel
> d
> >"coord"
>
> @6/X3D/Scene/0/Group/0/HAnimHumanoid/0/Shape/0/IndexedFaceSet/0/TextureCoordinate/0/$/contai
> nerField
> >"texCoord"
>
> @6/X3D/Scene/0/Group/4/Transform/0/Shape/0/Appearance/0/ImageTexture/0/$/containerField
> >"texture"
>
> @6/X3D/Scene/0/Group/4/Transform/0/Shape/0/IndexedFaceSet/0/$/containerField
> >"geometry"
>
> @6/X3D/Scene/0/Group/4/Transform/0/Shape/0/IndexedFaceSet/0/Coordinate/0/$/containerField
> >"coord"
>
> @6/X3D/Scene/0/Group/5/Transform/1/Shape/0/IndexedLineSet/0/$/containerField
> >"geometry"
>
> @6/X3D/Scene/0/Group/5/Transform/1/Shape/0/IndexedLineSet/0/Coordinate/0/$/containerField
> >"coord"
>
> @6/X3D/Scene/0/Group/5/Transform/2/Shape/0/IndexedLineSet/0/$/containerField
> >"geometry"
>
> @6/X3D/Scene/0/Group/5/Transform/3/Shape/0/IndexedLineSet/0/$/containerField
> >"geometry"
>
> Note that most of these are new containerFields, but there are perhaps
> important differences earlier in the files.
>
> 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.
>
> Indeed, how are the JSON files themselves different?
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20201121/f349671d/attachment.html>


More information about the x3d-public mailing list