<div dir="ltr">X3dToPython.xslt looks good too.  So I imagine it's only X3dToES5.xslt (deprecated) and X3dToNodeJS.xslt.  Not sure about JSON.<div><br></div><div>We have several routes:</div><div><br></div><div>Make a new translation of X3dToJava.xslt to X3dToNodeJS.xslt.</div><div>Make changes to existing X3dToNodeJS.xslt.</div><div>Make a stylesheet and serializer for ES6 (library TBD).</div><div>Make a stylesheet and serializer for draft ECMAScript SAI spec.  I'm not sure what we're targeting here.  X3DJSAIL is SAI, and therefore the nodejs port on top of X3DJSAIL is also SAI.</div><div>Do nothing.</div><div><br></div><div>I'm not really sure what's preferred.</div><div><br></div><div>I don't really want to support stylesheets.  I will support serializers to provide a second implementation.</div><div><br></div><div>I still need to provide a serializer for ES6.  I'm hoping to write an SAX parser soon.  I have a partially tested SAX-like parser for JSON.</div><div><br></div><div>I need to figure out the ES6 constructors.</div><div><br></div><div>John</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 30, 2020 at 9:11 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</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"><div dir="ltr">What I've seen is the X3dToJava.xslt does the "addLayerSet" properly.<div><br></div><div>So we need to upgrade the various stylesheets to how X3dToJava.xslt does it.</div><div><br></div><div>We can work on this Monday.  Thanks!</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 30, 2020 at 8:40 AM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">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">1. Thanks for your notes John.  I've reset our calendar appointment on Mondays for weekly recurrence.<br>
<br>
Note that Anita intends to consolidate Web3D zoom rooms starting next week.  Once that is in place we can switch our rendezvous coordinates and add this regular review event to the Web3D calendar.<br>
<br>
2. Of note regarding LayerSet is that it has a special inheritance hierarchy, which leads to the special handling below.  We likely need to consider and apply your fix for each of the conversion stylesheets.<br>
<br>
3. Meanwhile, it turns out that there are 9 active issues on LayerSet in Mantis!  I just connected them as related so that they can be addressed coherently, there is definitely some overlap in there.<br>
<br>
* Mantis: View Issues, then apply search filter "LayerSet"<br>
   <a href="https://www.web3d.org/member-only/mantis/view_all_bug_page.php" rel="noreferrer" target="_blank">https://www.web3d.org/member-only/mantis/view_all_bug_page.php</a><br>
<br>
4. Wondering if you consider "autoclass" a temporary prefix while designing the library.  It will certainly simplify authoring if a programmer can simply say<br>
<br>
    .addLayerSet((new LayerSet()).setDEF("scene.addChildLayerSetTest"))<br>
<br>
5. Corresponding X3DJSAIL Java invocation looks like this:<br>
<br>
  * Filename:     HelloWorldProgram.java<br>
  * Description:  Example "smoke test" program to create an X3D model using the X3D Java Scene Access Interface Library (X3DJSAIL).<br>
  * Identifier:   <a href="https://www.web3d.org/specifications/java/examples/HelloWorldProgram.java" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/java/examples/HelloWorldProgram.java</a><br>
<br>
        scene.addLayerSet (new LayerSetObject("scene.addChildLayerSetTest")); // string is DEF name<br>
<br>
It would be a powerful improvement if the Java might become similarly simplified.  Non-trivial, will keep looking at it.<br>
<br>
        scene.addLayerSet (new LayerSet      ("scene.addChildLayerSetTest")); // string is DEF name<br>
<br>
v/r Don<br>
<br>
<br>
On 5/29/2020 10:43 AM, John Carlson wrote:<br>
> This line from my serialized code does the trick.  Let's revisit how to do this in X3dToNodeJS.xslt on Monday.<br>
> <br>
>          .addLayerSet((new autoclass.LayerSet()).setDEF("scene.addChildLayerSetTest"))<br>
> <br>
> Will now check in my "repairs."<br>
> <br>
> John<br>
> <br>
> On Fri, May 29, 2020 at 12:22 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
>     java -cp ../jars/X3DJSAIL.4.0.full.jar org.web3d.x3d.jsail.CommandLine examples/HelloWorldProgramOutput.x3d -tojs -toFile examples/HelloWorldProgramOutput.Node.js<br>
>     parameter: source file HelloWorldProgramOutput.x3d filesize 22317 bytes<br>
>     CommandLine parameter: "-tojs" for conversion to X3DJSONLD JavaScript source<br>
>     CommandLine parameter: "-toFile" "examples/HelloWorldProgramOutput.Node.js" for result file name root examples/HelloWorldProgramOutput.Node<br>
>     Parsing using Document Object Model (DOM) based X3DLoaderDOM...<br>
>     [X3DLoaderDOM] <meta name='info' content='continued development and testing in progress'/><br>
>     convert to JS JavaScript:<br>
>     Warning: toFileStylesheetConversion(X3dToNodeJS.xslt) is overwriting prior file examples/HelloWorldProgramOutput.Node.js<br>
>     className='HelloWorldProgramOutput.Node' has illegal character(s) ( -.,;) replaced with '_' underscore character. newClassName='HelloWorldProgramOutput_Node'<br>
>     file conversion successful: HelloWorldProgramOutput.Node.js (37121 bytes)<br>
> <br>
>     coderextreme@DESKTOP-DOPK2VD MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/node" rel="noreferrer" target="_blank">www.web3d.org/x3d/stylesheets/java/node</a> <<a href="http://www.web3d.org/x3d/stylesheets/java/node" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/stylesheets/java/node</a>><br>
>     $ node examples/HelloWorldProgramOutput.Node.js<br>
>     C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a> <<a href="http://www.web3d.org" rel="noreferrer" target="_blank">http://www.web3d.org</a>>\x3d\stylesheets\java\node\examples\HelloWorldProgramOu<br>
>     tput.Node.js:176<br>
>          .addChild((new autoclass.LayerSet("scene.addChildLayerSetTest")))<br>
>           ^<br>
> <br>
>     Error: Could not find method "addChild(org.web3d.x3d.jsail.Layering.LayerSetObje<br>
>     ct)" on class "class org.web3d.x3d.jsail.Core.SceneObject". Possible matches:<br>
>        public org.web3d.x3d.jsail.Core.SceneObject org.web3d.x3d.jsail.Core.SceneObje<br>
>     ct.addChild(org.web3d.x3d.sai.Core.X3DChildNode)<br>
> <br>
>          at HelloWorldProgramOutput_Node.initialize (C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a> <<a href="http://www.web3d.org" rel="noreferrer" target="_blank">http://www.web3d.org</a>>\x3d\st<br>
>     ylesheets\java\node\examples\HelloWorldProgramOutput.Node.js:176:6)<br>
>          at new HelloWorldProgramOutput_Node (C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a> <<a href="http://www.web3d.org" rel="noreferrer" target="_blank">http://www.web3d.org</a>>\x3d\styleshee<br>
>     ts\java\node\examples\HelloWorldProgramOutput.Node.js:123:10)<br>
>          at Object.<anonymous> (C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a> <<a href="http://www.web3d.org" rel="noreferrer" target="_blank">http://www.web3d.org</a>>\x3d\stylesheets\java\node\e<br>
>     xamples\HelloWorldProgramOutput.Node.js:484:1)<br>
>     ?[90m    at Module._compile (internal/modules/cjs/loader.js:1176:30)?[39m<br>
>     ?[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:1<br>
>     0)?[39m<br>
>     ?[90m    at Module.load (internal/modules/cjs/loader.js:1040:32)?[39m<br>
>     ?[90m    at Function.Module._load (internal/modules/cjs/loader.js:929:14)?[39m<br>
>     ?[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_ma<br>
>     in.js:71:12)?[39m<br>
>     ?[90m    at internal/main/run_main_module.js:17:47?[39m<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>
</blockquote></div>