<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>As you can see from the original X3DJSAIL output from my code, it does need to be patched for MFString String arrays.  I recommend patching X3DJSAIL until my code produces the right output for MFString String arrays.  Then we will handle the other things as they appear.  Here is my code and XML again for testing.</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>Wednesday, May 24, 2017 7:20 PM<br><b>To: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a>; <a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>RE: X3DJSAIL: Interesting exception, but ... tableforstringconversion examples</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Okay, here is the original X3DJSAIL output from your and my programs:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></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<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Wednesday, May 24, 2017 7:10 PM<br><b>To: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a>; <a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>RE: X3DJSAIL: Interesting exception, but ... table forstringconversion examples<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Okay, with my patches.  Here the X3D, your and my code (same filename), and the output X3D.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I will report without patches later.<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>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Wednesday, May 24, 2017 2:13 PM<br><b>To: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Subject: </b>Re: X3DJSAIL: Interesting exception, but ... table for stringconversion examples<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I believe the reason you cannot see the problem is because you do not use arrays for MFStrings in your app code (try with both one and two SFStrings, and a quote in the SFstring at the end).<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>But I could be wrong. Will try to diagnose later.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>John<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On May 24, 2017 12:59 PM, "John Carlson" <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><p class=MsoNormal style='margin-left:9.6pt'>The only part I see left is getting the end part of an MFString correct in all cases in XML generation, both in your code and my code. but there's probably more out there.   I recall there being a problem with MFStrings in Scripts as well, but the code was equivalent, so I left it alone.<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:9.6pt'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:9.6pt'>On May 24, 2017 10:22 AM, "Don Brutzman" <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<o:p></o:p></p></div></div></blockquote></div></div><p class=MsoNormal style='margin-left:9.6pt'>OK John, thanks for persisting on this one!  Agreed very important... am thinking/hoping I finally understand the mismatch.<br><br>Conceptual error: the excess backslashes come from incorrectly trying to represent the XML value in the Java and JSON, rather than trying to represent the in-memory string array that is needed in the Java and JSON.<br><br>Possible root cause: specification -> XML -> Xpath -> XSLT -> recursion <- recursion -> .java/.json dizziness!<br><br>Email text/html awkwardness coupled with escaping of escaping of escaping hasn't helped us either.<br><br>How to regain clarity... let's build an HTML table that compares equivalences for<br><br>- value<br>- rendering<br>- XML .x3d<br>- ClassicVRML<br>- JSON<br>- Java<br><br>Putting it on an HTML table will help us avoid email twists that occur with reply indenting, mailer issues etc.<br><br>If the result makes sense, it will help us "zero in" on specific conversion pairs that are questionable.  If it works, will probably be useful for X3D Scene Authoring Hints.<br><br>More to follow in the next day or so...  once we get clear on each curious case, calibrating the stylesheet converters will be straightforward at this point.<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   <a href="tel:%2B1.831.656.2149" target="_blank">+1.831.656.2149</a><br>X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" target="_blank">http://faculty.nps.edu/brutzman</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>