[x3d-public] x3d json schema validation on x3d resources examples results

John Carlson yottzumm at gmail.com
Sun Mar 20 09:10:26 PDT 2016


There are a few of issues:

1.  Should the x3d json schema validator validate uris and report broken
uris?

2.  Should the x3d json loader validate uris and load valid ones?

3.  Should the x3d json loader load external JSON references?  If so, which
tags need to be handled?  Inlines, ExternProtoDeclare, others?

4.  Should the x3d json loader convert xml to json, or pass the xml uri
(validated or unvalidated) to an underlying library?

Schema validation is not my code.  I can perhaps tell the schema validation
suite to validate uris more than validating the string--I believe I added
something recently to allow relative uri strings, but making sure a uri is
there may involve 2 trips to web server if cache isn't enabled, one for
validation and one for loading.  The Loader doesn't currently have a cache,
but x3dom or cobweb may.  If you want to investigate the schema validation
I use and it's capabilities, I use Ajv.  You can easily replace the schema
validator, but I don't have a pluggable api yet (TBD).  I'd like a
pluggable api so you can replace the loader, the parser, the validator, the
prototype expander and the script converter, etc., but I'm not there yet.

Frankly, I would prefer if the loader would perform validation on JSON
uris, if it can identify them (can it really?  is there a type along with
an @url???) and if not, pass the URI to underlying code.  If it's not
passing a full list, that is an issue.  The X3D JSON loader is not yet a
full x3d player and serves as a bandaid between JSON and the players.  If
that is not understood, I will try to make it more clear.  One of the x3d
players is starting to implement JSON loading using my loader as an
example.  I believe that will be the best solution long term.

Ideally, the loader, the parser, and the validator would be the same code
base.  We don't live in an ideal world, and there is division of
responsibility.  Or you can multi-thread if you stream/pipe the stuff,
ideally.  That's not the current architecture.  Javascript doesn't have
threading afaik.
On Mar 20, 2016 11:11 AM, "John Carlson" <yottzumm at gmail.com> wrote:

> I would see if the X3DOM version works on the examples site.
> On Mar 20, 2016 2:41 AM, "clement at igonet.fr" <clement at igonet.fr> wrote:
>
>> As you say, that's not your code, I'm talking about example that don't
>> work at all. My problem is: who must I inform for that?
>>
>> Clement.
>>
>> Le 19 mars 2016 23:55:41 UTC+01:00, John Carlson <yottzumm at gmail.com> a
>> écrit :
>>>
>>> Perhaps I should ask the JSON schema validators if they can validate if
>>> URIs or files are present?
>>>
>>> That’s not my code.  Yes, I should handle JSON inline urls in my X3D
>>> JSON Loader (been meaning to do that).
>>>
>>> John
>>>
>>> On Mar 19, 2016, at 6:38 PM, clement at igonet.fr wrote:
>>>
>>> For geo examples, a lot of examples miss inline x3d url (url to x3d
>>> files no more available online).
>>> These examples can't work anywhere in anyway...
>>>
>>>
>>> Le 19 mars 2016 23:17:00 UTC+01:00, John Carlson <yottzumm at gmail.com> a
>>> écrit :
>>>>
>>>> We’ve got 245 files failing JSON schema with the everit validator, and
>>>> 3322 validating.  That’s around 93% validating.
>>>>
>>>> 90 of these schema validation error involve geoSystem. 4 are missing
>>>> encoding. Here they are:
>>>>
>>>>
>>>> examples//Basic/development/WrapperTagsExampleJsonCommentsAlternative.json
>>>> examples//X3dForAdvancedModeling/Buildings/Building.json
>>>>
>>>> examples//X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedAlternativeEncoding.json
>>>>
>>>> examples//X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedOriginalEncoding.json
>>>>
>>>> John
>>>>
>>>> ------------------------------
>>>>
>>>> x3d-public mailing list
>>>> x3d-public at web3d.org
>>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>>
>>>>
>>> clement at igonet.fr
>>>
>>>
>>>
>> clement at igonet.fr
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160320/39373055/attachment-0001.html>


More information about the x3d-public mailing list