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

John Carlson yottzumm at gmail.com
Fri Mar 25 23:35:27 PDT 2016


So it actually caught it after my PrototypeExpander ran on it.  So there may be a bug with how my PrototypeExpander handles -children which are SFNodes (actually they are MFNodes (arrays) in the JSON code, so I think the JSON is wrong).  You guys may have discussed this, or something like it, and I was ignorant at the time.

John
> On Mar 26, 2016, at 2:28 AM, John Carlson <yottzumm at gmail.com> wrote:
> 
> 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.<rubikOnFire.json><rubikOnFire.x3d><rubikOnFireFixed.json>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