[x3d-public] Trying to use X3dToJson.xslt in web page to produce JSON.

Don Brutzman brutzman at nps.edu
Sun Nov 29 18:20:14 PST 2015


Also noticed this:

On 11/29/2015 2:24 PM, John Carlson wrote:
>            { "Background":
>              {
>                "@backUrl":"\"cubemap/BK.png\" \"http://coderextreme.net/X3DJSONLD/cubemap/BK.png\"",
>                "@bottomUrl":"\"cubemap/BT.png\" \"http://coderextreme.net/X3DJSONLD/cubemap/BT.png\"",
>                "@frontUrl":"\"cubemap/FR.png\" \"http://coderextreme.net/X3DJSONLD/cubemap/FR.png\"",
>                "@leftUrl":"\"cubemap/LF.png\" \"http://coderextreme.net/X3DJSONLD/cubemap/LF.png\"",
>                "@rightUrl":"\"cubemap/RT.png\" \"http://coderextreme.net/X3DJSONLD/cubemap/RT.png\"",
>                "@topUrl":"\"cubemap/TP.png\" \"http://coderextreme.net/X3DJSONLD/cubemap/TP.png\""
>              }
>            },

These are incorrect, should be string arrays.  Found an error in parenthesis logic when checking url types - fixed.  Should look something like

{ "Background":
   {
     "@backUrl":["../GeometricShapes/images/back.png","http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/back.png"],
     "@bottomUrl":["../GeometricShapes/images/bottom.png","http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/bottom.png"],
     "@frontUrl":["../GeometricShapes/images/front.png","http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/front.png"],
     "@leftUrl":["../GeometricShapes/images/left.png","http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/left.png"],
     "@rightUrl":["../GeometricShapes/images/right.png","http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/right.png"],
     "@topUrl":["../GeometricShapes/images/top.png","http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/top.png"]
   }
},

Stylesheet correction again uploaded/checked in.

http://www.web3d.org/x3d/stylesheets/X3dToJson.xslt

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list