[x3d-public] x3d-public Digest, Vol 98, Issue 37

K Murphy murphthesurf1 at yahoo.com
Tue May 9 08:49:03 PDT 2017


UNSUBSCRIBE

Sent from Yahoo Mail on Android 
 
  On Tue, May 9, 2017 at 8:15 AM, x3d-public-request at web3d.org<x3d-public-request at web3d.org> wrote:   Send x3d-public mailing list submissions to
    x3d-public at web3d.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://web3d.org/mailman/listinfo/x3d-public_web3d.org
or, via email, send a message with subject or body 'help' to
    x3d-public-request at web3d.org

You can reach the person managing the list at
    x3d-public-owner at web3d.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of x3d-public digest..."


Today's Topics:

  1. Re: JSON schema: type for IMPORT, EXPORT (Don Brutzman)


----------------------------------------------------------------------

Message: 1
Date: Tue, 9 May 2017 08:13:37 -0700
From: Don Brutzman <brutzman at nps.edu>
To: <yottzumm at gmail.com>, Roy Walmsley <roy.walmsley at ntlworld.com>
Cc: 'X3D Graphics public mailing list' <x3d-public at web3d.org>
Subject: Re: [x3d-public] JSON schema: type for IMPORT, EXPORT
Message-ID: <a9e9d208-a212-9b77-bc25-1e57e0e209d1 at nps.edu>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

John, attached is what I see when visiting http://coderextreme.net/X3DJSONLD

Can we make the validator usable as an online tool for users?  If not on your site, maybe somewhere else?

On 5/8/2017 8:49 PM, yottzumm at gmail.com wrote:
> I like it when arrays are not nested inside arrays.
> 
> I?m having good progress on creating a new schema, and may find conflicts between the existing schema and the object model.  Fuzz testing is kind of fun.  As a side test, I am converting my fuzz to Java and see if it will compile (LOL).  I?m pretty amazed what will pass by the JSON schema now, and also what it catches.
> 
> Plus I?m liking my new console interface to the validator.  Has anyone tried my online validator at http://coderextreme.net/X3DJSONLD/?  Much improved over jshint/jslint/JSON.parse/jsonlint (uses Ajv!).  Now with elision of sibling objects!
> 
> 
> Do we want to migrate to the Draft 06 Meta Schema?
> 
> Are there any possibilities for converting the schematron to JSON?
> 
> Don?t forget you can use the JSON x3dvalidator to validate X3D JSON against Roy?s JSON schema.  Found here: https://github.com/coderextreme/x3dvalidate  Alex has 22 hours of effort in so far, and I?ve been porting over improvements and catching bugs in X3DJSONLD.
> 
> John
> 
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
> *From: *Don Brutzman <mailto:brutzman at nps.edu>
> *Sent: *Monday, May 8, 2017 11:18 PM
> *To: *Roy Walmsley <mailto:roy.walmsley at ntlworld.com>
> *Cc: *'John Carlson' <mailto:yottzumm at gmail.com>; 'X3D Graphics public mailing list' <mailto:x3d-public at web3d.org>
> *Subject: *Re: JSON schema: type for IMPORT, EXPORT
> 
> oops, looks like i misread your note and got confused.  looks like you did find how to fix it, am happy to retest when you are like.
> 
> p.s. time to head home i guess...  once again, thanks!  8)
> 
> On 5/8/2017 8:13 PM, Don Brutzman wrote:
> 
>  > Thanks for explaining, very helpful.  I believe that your description matches the attached example, where IMPORT appears in sequence next to other children.
> 
>  >
> 
>  > jslint local and online validation also passes:
> 
>  >
> 
>  > https://jsonlint.com/?json=http://www.web3d.org/x3d/content/examples/Basic/development/X3dHeaderPrototypeSyntaxExamples.json
> 
>  >
> 
>  > However am still not grokking why the JSON Schema validation is unhappy.  Are IMPORT and EXPORT indeed handled similarly to ROUTE for all uses (such as child of Scene or ProtoBody)?
> 
>  >
> 
>  > ========================================================================
> 
>  > ant -f C:\\x3d-code\\www.web3d.org\\x3d\\content\\examples\\Basic processScenes.json
> 
>  > get.saxon.check:
> 
>  > found C:\x3d-code\www.web3d.org\x3d\tools\jar/saxon9he.jar: true
> 
>  > get.saxon:
> 
>  > processScenes.json:
> 
>  > stylesheet compiled=false
> 
>  > C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/X3dSpecifications//X3dHeaderPrototypeSyntaxExamples.x3d processing with X3dToJson stylesheet
> 
>  > C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/X3dSpecifications//X3dHeaderPrototypeSyntaxExamples.json validation checking with jslint
> 
>  > C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/X3dSpecifications//X3dHeaderPrototypeSyntaxExamples.json validation checking with json-schema-validator
> 
>  > --- BEGIN C:\x3d-code\www.web3d.org\x3d\content\examples\Basic\X3dSpecifications\X3dHeaderPrototypeSyntaxExamples.json---
> 
>  > validation: FAILURE
> 
>  > [ {
> 
>  >    "level" : "error",
> 
>  >    "schema" : {
> 
>  >      "loadingURI" : "file:/C:/x3d-code/www.web3d.org/specifications/x3d-3.3-JSONSchema.json#",
> 
>  >      "pointer" : "/definitions/IMPORT"
> 
>  >    },
> 
>  >    "instance" : {
> 
>  >      "pointer" : "/X3D/Scene/-children/18/IMPORT"
> 
>  >    },
> 
>  >    "domain" : "validation",
> 
>  >    "keyword" : "type",
> 
>  >    "message" : "instance type (object) does not match any allowed primitive type (allowed: [\"array\"])",
> 
>  >    "found" : "object",
> 
>  >    "expected" : [ "array" ]
> 
>  > } ]
> 
>  > --- END C:\x3d-code\www.web3d.org\x3d\content\examples\Basic\X3dSpecifications\X3dHeaderPrototypeSyntaxExamples.json---
> 
>  > Java Result: 100
> 
>  > echo.timestamp:
> 
>  > timestamp 20:06:07 on 8 May 2017
> 
>  > processScenes.json complete.
> 
>  > BUILD SUCCESSFUL (total time: 3 seconds)
> 
>  > ========================================================================
> 
>  >
> 
>  >
> 
>  > On 5/8/2017 5:06 AM, Roy Walmsley wrote:
> 
>  >> Hi Don,
> 
>  >>
> 
>  >> Here is a graphic of the JSON schema structure for IMPORT.
> 
>  >>
> 
>  >> As you can see, it is an array, but an array of objects. This is also the structure listed in the draft JSON encoding at 4.3.2.15 (see http://www.web3d.org/documents/specifications/19776-5/V3.3/Part05/concepts.html#IMPORTPropertySyntax). However, comparison is useful against the ROUTE statement, which is not an array, but an object. Here it is:
> 
>  >>
> 
>  >> And the draft text is at http://www.web3d.org/documents/specifications/19776-5/V3.3/Part05/concepts.html#ROUTEPropertySyntax. Now, note that the text talks about it being an optional property of some ?-children? property arrays. So let us look at some of these:
> 
>  >>
> 
>  >>  * For the Scene object, the ?-children? property (http://www.web3d.org/documents/specifications/19776-5/V3.3/Part05/concepts.html#SceneChildrenPropertySyntax) includes ROUTE, IMPORT and EXPORT statements, among others.
> 
>  >>  * For the Node object, the ?-children? property, where it may optionally be added (http://www.web3d.org/documents/specifications/19776-5/V3.3/Part05/concepts.html#NodeChildrenPropertySyntax) includes ROUTE, IMPORT and EXPORT, among others
> 
>  >>  * Referring to the JSON schema, the ?-children? definition, equivalent to nodes derived from X3DChildNode, includes ROUTE,  IMPORT and EXPORT, among others.
> 
>  >>
> 
>  >> Thus I conclude that wherever an IMPORT or EXPORT statement can be used, is (unless I have missed something) always in the context of an MFNode field, or else as a direct child of the Scene statement. Hence it is already part of an array, and therefore does not need to be an array in its own right. Therefore, I propose to remove the array portion from the JSON schema definition, if everyone is in agreement.
> 
>  >>
> 
>  >> Thanks for spotting this and raising it.
> 
>  >>
> 
>  >> All the best,
> 
>  >>
> 
>  >> Roy
> 
>  >>
> 
>  >> -----Original Message-----
> 
>  >> From: Don Brutzman [mailto:brutzman at nps.edu]
> 
>  >> Sent: 08 May 2017 03:26
> 
>  >> To: Roy Walmsley <roy.walmsley at ntlworld.com>; John Carlson <yottzumm at gmail.com>
> 
>  >> Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
> 
>  >> Subject: JSON schema: type for IMPORT, EXPORT
> 
>  >>
> 
>  >> x3d-3.3-JSONSchema.json says
> 
>  >>
> 
>  >>                                  "IMPORT": {
> 
>  >>
> 
>  >>                                                  "type": "array",
> 
>  >>
> 
>  >>                                  "EXPORT": {
> 
>  >>
> 
>  >>                                                  "type": "array",
> 
>  >>
> 
>  >> but likely should be structured similarly to
> 
>  >>
> 
>  >>                                  "ROUTE": {
> 
>  >>
> 
>  >>                                                  "type": "object",
> 
>  >>
> 
>  >> Diagnostic: test scene X3dHeaderPrototypeSyntaxExamples.json attached, with excerpt:
> 
>  >>
> 
>  >> { "IMPORT":
> 
>  >>
> 
>  >>    {
> 
>  >>
> 
>  >>                  "@AS":"someInlineRoot",
> 
>  >>
> 
>  >>                  "@importedDEF":"someName",
> 
>  >>
> 
>  >>                  "@inlineDEF":"someInline"
> 
>  >>
> 
>  >>    }
> 
>  >>
> 
>  >> },
> 
>  >>
> 
>  >> { "PositionInterpolator":
> 
>  >>
> 
>  >>    {
> 
>  >>
> 
>  >>                  "@DEF":"StayInPlace",
> 
>  >>
> 
>  >>                  "@key":[0,1],
> 
>  >>
> 
>  >>                  "@keyValue":[0,0,0,0,0,0]
> 
>  >>
> 
>  >>    }
> 
>  >>
> 
>  >> },
> 
>  >
> 
>  >
> 
>  > all the best, Don
> 
> 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
> 


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CoderExtreme.png
Type: image/png
Size: 271975 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170509/3ca526f8/attachment.png>

------------------------------

Subject: Digest Footer

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org


------------------------------

End of x3d-public Digest, Vol 98, Issue 37
******************************************
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170509/a68b1229/attachment-0001.html>


More information about the x3d-public mailing list