<html xmlns:v="urn:schemas-microsoft-com:vml" 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:0cm;
        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;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Hi John,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Let’s remember that the string field in the Text node is of type MFString.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Yes. These two examples would be encoded differently in JSON.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>No. The first is not an illegal expression, or is it. Reviewing ISO/IEC 19776-1 clause 5.15 SFString and MFString (<a href="http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#SFString">http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#SFString</a>) there is no mention of white space separators. However, clause 5.1.2 Description (<a href="http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#5.1.2">http://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/EncodingOfFields.html#5.1.2</a>) does say that “</span>Multiple-valued fields are written as an ordered list of values enclosed in quotations and separated by whitespace.”. So whitespace seems to be required. Since SFString values have quotation marks as delimiters, the requirement for whitespace could be considered superfluous. So, implementations may, or may not, expect it. In conclusion, perhaps the first example is illegal. <span style='mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>I’m trying to follow what you want, in each case. I’ll look at each in turn.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>The first line reads (with added spaces for readability):<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>-                        <Text string=' "Target Locked" " FIRE!..""(Green Button)" '/><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>This could be parsed as three separate strings. Namely “Target Locked”, then “ FIRE!..”, and finally “(Green Button)”. Or perhaps just as two strings, the second being “ FIRE!..” and the remainder is lost. Or perhaps the parser will complain about it and fall over.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>The second line reads (<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>+                        <Text string=' "Target Locked" " FIRE!..\"\"(Green Button)” ’<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>This will be parsed as two separate strings. Namely “Target Locked”, and then “ FIRE!..\”\”(Green Button)”. When displayed, the escaping should then render the second string as <span style='color:#00B050'>FIRE!..””(Green Button)</span>.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>What do you want to render? Then we can work out the correct encoding, for both JSON and XML.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>All the best,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Roy<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> John Carlson [mailto:yottzumm@gmail.com] <br><b>Sent:</b> 19 May 2017 10:59<br><b>To:</b> X3D Graphics public mailing list <x3d-public@web3d.org>; Don Brutzman <brutzman@nps.edu>; Roy Walmsley <roy.walmsley@ntlworld.com><br><b>Subject:</b> RE: question on MFStrings in XML.<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>Should these two examples be encoded differently in JSON?  That is my question!  Is the first an illegal expression?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>John<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From: </span></b><span lang=EN-US><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Friday, May 19, 2017 2:37 AM<br><b>To: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:brutzman@nps.edu">Don Brutzman</a>; <a href="mailto:roy.walmsley@ntlworld.com">Roy Walmsley</a><br><b>Subject: </b>question on MFStrings in XML.<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>-                        <Text string='"Target Locked" " FIRE!..""(Green Button)"'/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>+                        <Text string='"Target Locked" " FIRE!..\"\"(Green Button)<a href="mailto:%22'/%3e%0d%0dAre%20these%20equivalent%20or%20not? %20Thanks!%0d%0dThe%20first%20is%20from%20the%20Savage%20examples.%0d%0bHere's%20how%20I'm%20encoding%20it%20in%20JSON:%0d%0d     %20                       %22@string%22:%5b%22Target">"'/><o:p></o:p></a></span></p><p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US><a href="mailto:%22'/%3e%0d%0dAre%20these%20equivalent%20or%20not? %20Thanks!%0d%0dThe%20first%20is%20from%20the%20Savage%20examples.%0d%0bHere's%20how%20I'm%20encoding%20it%20in%20JSON:%0d%0d     %20                       %22@string%22:%5b%22Target"><o:p><span style='text-decoration:none'> </span></o:p></a></span></span></p><p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US><a href="mailto:%22'/%3e%0d%0dAre%20these%20equivalent%20or%20not? %20Thanks!%0d%0dThe%20first%20is%20from%20the%20Savage%20examples.%0d%0bHere's%20how%20I'm%20encoding%20it%20in%20JSON:%0d%0d     %20                       %22@string%22:%5b%22Target">Are these equivalent or not?  Thanks!<o:p></o:p></a></span></span></p><p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US><a href="mailto:%22'/%3e%0d%0dAre%20these%20equivalent%20or%20not? %20Thanks!%0d%0dThe%20first%20is%20from%20the%20Savage%20examples.%0d%0bHere's%20how%20I'm%20encoding%20it%20in%20JSON:%0d%0d     %20                       %22@string%22:%5b%22Target"><o:p><span style='text-decoration:none'> </span></o:p></a></span></span></p><p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US><a href="mailto:%22'/%3e%0d%0dAre%20these%20equivalent%20or%20not? %20Thanks!%0d%0dThe%20first%20is%20from%20the%20Savage%20examples.%0d%0bHere's%20how%20I'm%20encoding%20it%20in%20JSON:%0d%0d     %20                       %22@string%22:%5b%22Target">The first is from the Savage examples.<o:p></o:p></a></span></span></p><p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US><a href="mailto:%22'/%3e%0d%0dAre%20these%20equivalent%20or%20not? %20Thanks!%0d%0dThe%20first%20is%20from%20the%20Savage%20examples.%0d%0bHere's%20how%20I'm%20encoding%20it%20in%20JSON:%0d%0d     %20                       %22@string%22:%5b%22Target"><br>Here’s how I’m encoding it in JSON:<o:p></o:p></a></span></span></p><p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US><a href="mailto:%22'/%3e%0d%0dAre%20these%20equivalent%20or%20not? %20Thanks!%0d%0dThe%20first%20is%20from%20the%20Savage%20examples.%0d%0bHere's%20how%20I'm%20encoding%20it%20in%20JSON:%0d%0d     %20                       %22@string%22:%5b%22Target"><o:p><span style='text-decoration:none'> </span></o:p></a></span></span></p><p class=MsoNormal><span class=MsoHyperlink><span lang=EN-US><a href="mailto:%22'/%3e%0d%0dAre%20these%20equivalent%20or%20not? %20Thanks!%0d%0dThe%20first%20is%20from%20the%20Savage%20examples.%0d%0bHere's%20how%20I'm%20encoding%20it%20in%20JSON:%0d%0d     %20                       %22@string%22:%5b%22Target">                             "@string":["Target</a></span></span><span lang=EN-US> Locked"," FIRE!..\"\"(Green Button)"]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>John<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>