[x3d-public] json schema validation problem: "-children" comments inside "head" element

Don Brutzman brutzman at nps.edu
Fri Jul 1 22:59:39 PDT 2016


Am getting json validation errors like the following when a comment appears inside a head tag, originally as peer of meta tags.

================================================
validation error:

C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors/Chapter05-AppearanceMaterialTextures//FillProperties.json error checking with json-schema-validator
--- BEGIN C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapter05-AppearanceMaterialTextures\FillProperties.json---
validation: FAILURE
[ {
   "level" : "error",
   "schema" : {
     "loadingURI" : "file:/C:/x3d-code/www.web3d.org/specifications/x3d-3.3-JSONSchema.json#",
     "pointer" : "/definitions/head"
   },
   "instance" : {
     "pointer" : "/X3D/head"
   },
   "domain" : "validation",
   "keyword" : "additionalProperties",
   "message" : "object instance has properties which are not allowed by the schema: [\"-children\"]",
   "unwanted" : [ "-children" ]
} ]
--- END C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors\Chapter05-AppearanceMaterialTextures\FillProperties.json---
Java Result: 100

================================================
snippets:

     "head": {
         "-children":[
           { "#comment":"The following component tag is needed since FillProperties node is not part of the default Immersive profile"
           }
         ],
         "component": [
           {
             "@name":"Shape",
             "@level":3
           }
         ],
         "meta": [
           {
             "@name":"title",
             "@content":"FillProperties.x3d"
           },
           {
             "@name":"description",
             "@content":"Demonstrate various FillProperties values."
           },
etc.
         ]
     },

================================================
   <head>
     <!-- The following component tag is needed since FillProperties node is not part of the default Immersive profile -->
     <component level='3' name='Shape'/>
     <meta content='FillProperties.x3d' name='title'/>
     <meta content='Demonstrate various FillProperties values.' name='description'/>
etc.
   </head>

================================================

I think that the json schema needs to be allow the "-children" field here, and similarly inside other statements, wherever a "#comment" is allowed to appear.

Once we get this sorted out, we should check on the corresponding prose in the new draft X3D JSON Encoding specification.

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