<p dir="ltr">There are a few of issues:</p>
<p dir="ltr">1. Should the x3d json schema validator validate uris and report broken uris?</p>
<p dir="ltr">2. Should the x3d json loader validate uris and load valid ones?</p>
<p dir="ltr">3. Should the x3d json loader load external JSON references? If so, which tags need to be handled? Inlines, ExternProtoDeclare, others?</p>
<p dir="ltr">4. Should the x3d json loader convert xml to json, or pass the xml uri (validated or unvalidated) to an underlying library?</p>
<p dir="ltr">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.</p>
<p dir="ltr">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.</p>
<p dir="ltr">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.</p>
<div class="gmail_quote">On Mar 20, 2016 11:11 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I would see if the X3DOM version works on the examples site.</p>
<div class="gmail_quote">On Mar 20, 2016 2:41 AM, "<a href="mailto:clement@igonet.fr" target="_blank">clement@igonet.fr</a>" <<a href="mailto:clement@igonet.fr" target="_blank">clement@igonet.fr</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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?<br>
<br>
Clement.<br><br><div class="gmail_quote">Le 19 mars 2016 23:55:41 UTC+01:00, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> a écrit :<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Perhaps I should ask the JSON schema validators if they can validate if URIs or files are present?<div><br></div><div>That’s not my code. Yes, I should handle JSON inline urls in my X3D JSON Loader (been meaning to do that).</div><div><br></div><div>John<br><div><blockquote type="cite"><div>On Mar 19, 2016, at 6:38 PM, <a href="mailto:clement@igonet.fr" target="_blank">clement@igonet.fr</a> wrote:</div><br><div><div style="word-wrap:break-word">For geo examples, a lot of examples miss inline x3d url (url to x3d files no more available online).<br>
These examples can't work anywhere in anyway...<br>
<br><br><div class="gmail_quote">Le 19 mars 2016 23:17:00 UTC+01:00, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> a écrit :<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
We’ve got 245 files failing JSON schema with the everit validator, and 3322 validating. That’s around 93% validating.<div><br></div><div>90 of these schema validation error involve geoSystem. 4 are missing encoding. Here they are:</div><div><br></div><div><span style="font-family:Menlo;font-size:11px">examples//Basic/development/WrapperTagsExampleJsonCommentsAlternative.json</span></div><div><span style="font-family:Menlo;font-size:11px">examples//X3dForAdvancedModeling/Buildings/Building.json</span></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">examples//X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedAlternativeEncoding.json</div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">examples//X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedOriginalEncoding.json</div><div><br></div></div></div><div>John</div><div style="margin-top:2.5em;margin-bottom:1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(0,0,0)"><br></div><pre><hr><br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br></pre></blockquote></div><br>
<a href="mailto:clement@igonet.fr" target="_blank">clement@igonet.fr</a></div></div></blockquote></div><br></div></blockquote></div><br>
<a href="mailto:clement@igonet.fr" target="_blank">clement@igonet.fr</a></div></blockquote></div>
</blockquote></div>