[x3d-public] Please generate an array for -geometry here, it's an MFNode. in X3dToJson.xslt

John Carlson yottzumm at gmail.com
Tue Apr 17 22:11:52 PDT 2018


    <Transform translation='1.0 1.0 0.0'>
      <Shape>
        <Appearance>
          <Material DEF='INDICATOR-MATERIAL' emissiveColor='0.0 0.0 1.0'/>
        </Appearance>
        <Sphere radius='0.2'/>
      </Shape>
    </Transform>
    <RigidBodyCollection DEF='BODY-COLLECTION'>
      <RigidBody DEF='BODY-1' containerField='bodies' finiteRotationAxis='0 1 0' position='0.0 2.0 0.0'>
        <CollidableShape USE='BALL-GEOM' containerField='geometry'/>
      </RigidBody>
    </RigidBodyCollection>

Here’s what it ends up in JSON:

{ "RigidBodyCollection":
            {
              "@DEF":"BODY-COLLECTION",
              "-bodies":[
                { "RigidBody":
                  {
                    "@DEF":"BODY-1",
                    "@position":[0.0,2.0,0.0],
                    "-geometry":
                      { "CollidableShape":
                        {
                          "@USE":"BALL-GEOM"
                        }
                      }
                  }
                }
              ]
            }
          },


Is this valid?  The object model says it is.  However the autogenerated JSON schema doesn’t pass.  Looking at the object model again, it says geometry is an MFNode.   Therefore x3dToJson.xslt should generate an array, not an object.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180418/2e0aef9e/attachment.html>


More information about the x3d-public mailing list