[x3d-public] json schema validation problem: "-children" comments inside "head" element
Roy Walmsley
roy.walmsley at ntlworld.com
Sat Jul 2 11:28:58 PDT 2016
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 <mailto:brutzman at nps.edu> 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> http://faculty.nps.edu/brutzman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160702/fc0b6381/attachment.html>
More information about the x3d-public
mailing list