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

Don Brutzman brutzman at nps.edu
Sat Jul 2 16:25:30 PDT 2016


OK great Roy, thank you.  Initial testing of the schema change is looking good.

On 7/2/2016 1:01 PM, Roy Walmsley wrote:
> Don,
>
>
>
> I implemented the two actions I described below for this instance. I found a typo in the Schema, and fixed that. I’ve now checked it into SourceForge. Incidentally, the new version also incorporates amendments to the placement of IMPORT/EXPORT statements, as previously agreed.
>
>
>
> I checked the draft JSON encoding text. No direct changes required, as already covered in 4.3.2.4.1 “-children” property syntax.
>
>
>
> However, it does require an update to Annex A. So, I have made this change and committed it to GitHub.
>
>
>
> Roy
>
>
>
> *From:*x3d-public [mailto:x3d-public-bounces at web3d.org] *On Behalf Of *Roy Walmsley
> *Sent:* 02 July 2016 19:29
> *To:* 'Don Brutzman'
> *Cc:* 'X3D Graphics public mailing list'
> *Subject:* Re: [x3d-public] json schema validation problem: "-children" comments inside "head" element
>
>
>
> Don,
>
>
>
> I agree. I can, for this specific case:
>
>
>
> 1)      Update the Schema to permit this
>
> 2)      Update the text of the draft encoding
>
>
>
> Then we probably want a more general review to see if there are missing instances.
>
>
>
> Roy
>
>
>
> -----Original Message-----
> From: Don Brutzman [mailto:brutzman at nps.edu]
> Sent: 02 July 2016 07:00
> To: Roy Walmsley
> Cc: John Carlson; X3D Graphics public mailing list
> Subject: json schema validation problem: "-children" comments inside "head" element
>
>
>
> 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 <mailto: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
>


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