<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Here’s a zip with my patch to x3d-code/www.web3d.org/x3d/stylesheets, as it now stands.  It doesn’t work yet, and I’d like to modify the main Create stylesheet and build.xml some more</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Contents:</p><p class=MsoNormal>nashorn/examples/ -- examples folder for build.xml</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>nashorn/node is X3DJSONLD files and can be licensed with the standard Web3D license.</p><p class=MsoNormal>nashorn/node/fieldTypes.js</p><p class=MsoNormal>nashorn/node/JavaScriptSerializer.js --  X3D JSON -> Nashorn serializer.</p><p class=MsoNormal>nashorn/node/mapToMethod.js</p><p class=MsoNormal>nashorn/node/mapToMethod2.js</p><p class=MsoNormal>nashorn/node/X3DJSONLD.js</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>nashorn/repeatPolyfill.js – repeat polyfill – copied from Mozilla</p><p class=MsoNormal>nashorn/jvm-npm.js – require for nashorn – from jvm-npm npm package with my modifications to fix java.util.Scanner code.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>test.bat – run this to test Create stylesheet and test-nashorn targets</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:red'>x3d.stylesheets.patch – patches to apply to existing code.</span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Ideally, we’d have the nashorn folder under a separate license mentioning jvm-npm  (Apache) and the repeat polyfill from Mozilla and X3DJSONLD</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The rest I grant license to the Web3D consortium.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The main problem appears to be extra newlines added by the stylesheet process, but we need to keep the intermediate files to make sure.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I believe this is all that is needed for nashorn output from X3DJSAIL, minus some patches.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>X3DJSAIL in this state does not run script code.  Only the ant target does that.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Sunday, November 5, 2017 9:03 PM<br><b>To: </b><a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>; <a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Subject: </b>X3dToJson.xlst fails in the context of toStringJSON in functiontoFileJavaScript in X3DJSAIL.</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Extra newlines are added for long lines.  I think it’s a stylesheet running problem.  Possible a configuration issue with HelloWorldProgram.java or HelloWorldProgramOutput.java.<br><br>I will try to create a reproducible diff.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>