<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>I have at least one more task on DOM2JSONSerializer.js.  I need to identify the container fields -parts and -shaders at least—instead of using -children.  This was done in the other serializers with mapToMethod*.js.  I could use those again, but I will have to take off the “set” and “add”.   What would be cool is if we could identify these from the original JSON.  For some reason, these aren’t coming across to the DOMSerializer.js I don’t think.   So there’s a failing in X3DJSONLD.js…beware X_ITE!   X3DJSONLD.js (and thereby JSONParser.js) is messed up! So the DOM won’t contain containerField attributes in many cases.  I am not sure what cases this matters in.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Perhaps it’s time to revert some changes to X3DJSONLD.js to include more containerFields.  Hmm.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I don’t think this is a death knell, but it probably will affect JSON schema validation and roundtrip comparison!</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Time for me to think on this.   What cases should containerField get filled in in the DOM?  I have been trying to minimize them, but it shot me in the foot, so now I’m tending to maximize it.</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>Monday, March 5, 2018 1:22 PM<br><b>To: </b><a href="mailto:andreasplesch@gmail.com">Andreas Plesch</a><br><b>Cc: </b><a href="mailto:holger.seelig@yahoo.de">Holger Seelig</a>; <a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Subject: </b>Re: Effects of scrunching all VRMLscript in a Script into a singleline, X_ITE.</p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Thanks for your explanation, Andreas.  It looks like I should proceed with good speed at coming up with a replacement for X3dToJson.xslt.    which is almost complete, if someone wants to help...</p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONSerializer.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONSerializer.js</a></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>One of the last tasks is identifying which arrays should be objects.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>John</p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Mar 5, 2018 12:57 PM, "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:</p></div></div><p class=MsoNormal style='margin-left:4.8pt'>One (fatal) issue with just merging all lines into a single line are<br>caused by ecmascript single line comments:<br><br>// helpful explanation<br>var radius1 = outerRadius - toothDepth / 2;<br>...<br><br>versus<br><br>// helpful explanation var radius1 = outerRadius - toothDepth / 2; ...<br><br>which never evaluates radius1.<br><br>If all comments would be replaced by multiline commenting  as in /*<br>helpful explanation */ , the single script line may work (if all lines<br>are carefully terminated by semicolons which is not required in many<br>situations in ecmascript:<br><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Automatic_semicolon_insertion" target="_blank">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Automatic_semicolon_insertion</a><br>, <a href="https://www.theregister.co.uk/2018/01/12/javascript_technical_group_semicolons/" target="_blank">https://www.theregister.co.uk/2018/01/12/javascript_technical_group_semicolons/</a>).<br><br>It is definitely safest (and probably unavoidable) to preserve line<br>breaks in the json.<br><br>X_ITE itself cannot really do much more than eval the provided script as is.<br><br>-Andreas<br><br><br><br><br>On Mon, Mar 5, 2018 at 11:23 AM, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>> Holger, can you look at X_ITE to see the effect of scrunching all the<br>> VRMLScript in a Script into a single line?  I’m having issues with that<br>> right now, with JSON.  Thanks!<br>><br>><br>><br>> John<br><br><br><br>--<br>Andreas Plesch<br>Waltham, MA 02453</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>