<p dir="ltr">Initial script support that runs after the proto expander is here: <a href="https://github.com/coderextreme/X3DJSONLD/blob/master/Script.js">https://github.com/coderextreme/X3DJSONLD/blob/master/Script.js</a> It's by no means complete. PrototypeExpander.js is currently in development but passes many tests in same repository.    There's a client and server side component in the same file.  I am deprecating ServerPrototypeExpander.js.  PPP.js runs the server and client prototype expanders and produces JSON output from input JSON.  runppp.sh is an example of running PPP.js against several files (linux and mac shell script).</p>
<p dir="ltr">I think if a proto expander were to make proper use of id and class attributes, it could be easily be integrated into an html5 environment w/o scripts, and html5 scripts could be added to manipulate it.  We probably need a standard for generating id and class from @DEF @name and @USE.</p>
<p dir="ltr">The client-side prototype expander may be run here: <a href="http://coderextreme.net/X3DJSONLD/">http://coderextreme.net/X3DJSONLD/</a>  Server-side (extern protos) is not included at this time. </p>
<p dir="ltr">I do think we can leverage Cobweb's script support, but I haven't looked at it yet, so I'm no expert.  If we had JSON and Cobweb together in the same package it might be the best of breed.   JSON -> XML -> Cobweb already works well for prototypes and scripts without the above code.  I am looking forward to full integration when the X3D JSON standard arrives, so inlines are handled better.</p>
<p dir="ltr">In other words, let's support cobweb even though it's the newcomer to the block.  Then we don't even need a proto expander and we can focus on more important areas, like finalizing full JSON support in all packages.</p>
<p dir="ltr">My thoughts.  My intention is for my code to disappear.  It's a proof of concept.</p>
<p dir="ltr">John</p>
<div class="gmail_quote">On Jun 3, 2016 2:57 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I also think it's feasible to write a proto expander with script node support.  I'm just not smart enough to do it by myself with little X3D experience or knowledge.  I'm slowly getting there.</p><div class="elided-text">
<div class="gmail_quote">On Jun 3, 2016 2:48 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br type="attribution"><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">In other words, let's leverage the advantages that the upcoming JSON encoding gives us for V4</p><div>
<div class="gmail_quote">On Jun 3, 2016 2:44 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com" target="_blank">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 think scripts can be used if the XML encoding is not preferred or we use a different tag for scripts.  We can use DOM without using the XML encoding as well.<br>
</p>
</blockquote></div>
</div></blockquote></div>
</div></blockquote></div>