<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'>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'>I am assuming that the file in question is in the Savage examples archive. I can see the line in question in that file. Just out of interest, I looked on the web page at the Cobweb image, and zoomed right into the cockpit to view the controls. I spotted the text. It’s been implemented as three separate strings.</span> Judging by the appearance on the screen, I’d hazard a guess that was the intention of the model designer. Don might be able to provide more insight.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So, in conclusion, I’d say the model needs to be fixed, by inserting a space between the second and  third strings.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What does the XSLT do? Is it specifically looking for whitespace between strings? Does it care whether there is some, or not?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>All the best,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Roy<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 12:14<br><b>To:</b> Roy Walmsley <roy.walmsley@ntlworld.com>; 'X3D Graphics public mailing list' <x3d-public@web3d.org>; 'Don Brutzman' <brutzman@nps.edu><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>Roy, I’ve got a file F16.x3d with the first case, and I need to know how to handle it, perhaps by making X3dToJson.xslt keel over and complain.  I’m trying to fix X3dToJson.xslt, to convert the X3D (if legal) to JSON.  I believe I have my own copy of X3dToJson.xslt.  I am hoping my copy will be accepted, if it’s doing the right thing.  I do have some cases it’s failing on, but perhaps the standard one would fail as well.  More work!  Attached.<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:roy.walmsley@ntlworld.com">Roy Walmsley</a><br><b>Sent: </b>Friday, May 19, 2017 6:45 AM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">'John Carlson'</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: 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>Hi John,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Let’s remember that the string field in the Text node is of type MFString.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Yes. These two examples would be encoded differently in JSON.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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 “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. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m trying to follow what you want, in each case. I’ll look at each in turn.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The first line reads (with added spaces for readability):<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>-                        <Text string=' "Target Locked" " FIRE!..""(Green Button)" '/><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The second line reads (<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></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>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></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What do you want to render? Then we can work out the correct encoding, for both JSON and XML.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>All the best,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Roy<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></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 [<a href="mailto:yottzumm@gmail.com">mailto:yottzumm@gmail.com</a>] <br><b>Sent:</b> 19 May 2017 10:59<br><b>To:</b> X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>>; Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>>; Roy Walmsley <<a href="mailto:roy.walmsley@ntlworld.com">roy.walmsley@ntlworld.com</a>><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">"'/></a></span><span class=MsoHyperlink><o:p></o:p></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!</a><o:p></o:p></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.</a><o:p></o:p></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:</a><o:p></o:p></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)"]<span class=MsoHyperlink><o:p></o:p></span></span></p><p class=MsoNormal><span lang=EN-US>John</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>