<div dir="ltr">There's only one open-source JavaScript Prototype implementation that i know of, namely X_ITE.<div><br></div><div>I'll look into it a bit, but Andreas is much better at both X3DOM and X_ITE, and maybe could layout a design that I could follow that would fit into X3DOM similar to how the current "JSONExpander" does, nearly a drop in replacement.</div><div><br></div><div>Could we convert Xj3D Prototype libraries to ECMAScript 6?</div><div><br></div><div>I'm not really seeing a clean solution in X_ITE prototype expanding that I have for JSON.   Basically, I do something similar to UNIX pipe, so I can take toggle the protoexpander on and off like I do in X3DJSONLD, easily replacing one implementation with another.</div><div><br></div><div>I'm the JSON/JavaScript guy, not the XML guy.  Don, you're the XML guy, do XML-like things. I got very lucky with X3DJSONLD and "JSONExpander" fitting right into X3DOM from my design.  I didn't even look at how X3DOM was implemented!  X_ITE is a bit harder to understand.</div><div><br></div><div>I'm not really sure how "inconsistent" browsers are these days.</div><div><br></div><div>I'm more worried if someone applies the brakes really hard in front of me.</div><div><br></div><div>Basically, I'm going to start pushing hard that both X_ITE and X3DOM conform to ES6 class style development with import/export.  I think it's a good thing for X3D too.</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 7, 2020 at 1:18 AM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">BLUF: write javascript that uses a ProtoDeclare as a cookie-cutter macro design for stomping out new scene subgraphs.  A prototype... expander.<br>
<br>
Multiple open-source proto implementations exist.  At first it can be hard driving in fog - but it gets a lot easier when you can follow someone else's tail lights.<br>
<br>
On 5/6/2020 9:53 PM, John Carlson wrote:<br>
> Can we convert XSLT files to JavaScript?   That's Saxon-JS, right?  I am a bit worried about Saxon-CE.  Browser-native XSLT 1.0 processing might be feasible? That would be best.<br>
<br>
The code patterns in XSLT are verbose (constructing strings and walking trees) in ways that don't match how any javascript implementation would go about doing things.  I further doubt that they want to include an XSLT engine in X3DOM, or depend on inconsistent browser implementations.<br>
<br>
<br>
  Then there would be less code to download?  It would be worth seeing if there's a good product for XSLT 2.0 in the browser.<br>
> What features of XSLT 2.0 are we using in the various stylesheets?<br>
> <br>
> We are looking at a total remake for XML/DOM, I think, not sure.  I am fairly sure the code deserves re-engineering.<br>
> <br>
> Will look.<br>
> <br>
> John<br>
> <br>
> On Wed, May 6, 2020 at 11:41 PM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>> wrote:<br>
> <br>
>     If X3DOM is written in Javascript then I recommend writing the ProtoExpander in Javascript.  Then it will be directly compatible and maintainable.<br>
> <br>
>     On 5/6/2020 9:32 PM, John Carlson wrote:<br>
>      > Don, are we on track for an XML/XSLT ProtoExpander for integration into X3DOM?  Is it on the wish list?<br>
>      ><br>
>      > Thanks,<br>
>      ><br>
>      > John<br>
> <br>
>     all the best, Don<br>
>     -- <br>
>     Don Brutzman  Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br>
>     Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
>     X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
> <br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div>