[x3d-public] bug report X3dToJson.xslt stylesheet. Handling of SFNode as parameter to Proto

John Carlson yottzumm at gmail.com
Fri Mar 25 23:28:41 PDT 2016


If you pass an SFNode to a Proto, it is treated as an MFNode and given -children, and not -value or -child.  This can create -geometry nodes which are arrays instead of objects.  Here are an X3D example, the converted JSON, and how the JSON should appear (hand edited).  I did not pick -value or -child because I forgot what we chose.  I could probably fix this another way, but i think -children is misleading when it’s an SFNode.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rubikOnFire.json
Type: application/json
Size: 14674 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160326/4d57589e/attachment-0002.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rubikOnFire.x3d
Type: model/x3d+xml
Size: 6186 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160326/4d57589e/attachment-0001.x3d>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rubikOnFireFixed.json
Type: application/json
Size: 14604 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160326/4d57589e/attachment-0003.json>
-------------- next part --------------
You may use my X3D file in your X3D resources examples if you wish.  rubikOnFire.json  does not pass schema. If there’s a problem with my X3D file, then we should fix QA, because it passed the latest X3D-Edit tests. (Perhaps there should be a warning?).  If there is a problem with my X3D file, then JSON should not be produced.

So take your pick, fix the stylesheet, or find an error in my X3D file.   Good luck with both.

There’s likely more bugs to report.  This is just the first one.  Good catch Roy!

Thanks,

John


More information about the x3d-public mailing list