<div dir="auto">Don,<div dir="auto"><br></div><div dir="auto">I believe you also need to handle commas with spaces, ala '"", ""'</div><div dir="auto"><br></div><div dir="auto">John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On May 28, 2017 7:30 PM, "Don Brutzman" <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK fixed problem with X3dToJson.xslt stylesheet mistaken escaping if intermediate "," delimiters.<br>
<br>
Continuing with modified test scene<br>
<br>
        <a href="http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/examples/Basic/X3dSpecifica<wbr>tions/StringArrayEncodingExamp<wbr>lesIndex.html</a><br>
<br>
to include commas between MFString elements:<br>
<br>
<Shape><br>
  <Text string='"One, Two, Three","","He said, \"Immel did it!\""'><br>
    <FontStyle justify='"MIDDLE","MIDDLE"' style='BOLD'/><br>
  </Text><br>
  <Appearance><br>
    <Material diffuseColor='0.6 0.4 0.2'/><br>
  </Appearance><br>
</Shape><br>
<br>
resulting in<br>
<br>
{ "Text":<br>
  {<br>
        "@string":["One, Two, Three","","He said, \"Immel did it!\""],<br>
        "-fontStyle":<br>
          { "FontStyle":<br>
                {<br>
                  "@justify":["MIDDLE","MIDDLE"]<wbr>,<br>
                  "@style":"BOLD"<br>
                }<br>
          }<br>
  }<br>
},<br>
<br>
note corrected "@justify":["MIDDLE","MIDDLE"]<wbr>,<br>
<br>
Checked in.  Redeploying X3DJSAIL and regression testing all .json examples (though few are expected to be affected because there are few such examples).  Also redeploying X3DJSAIL to match.<br>
<br>
<br>
On 5/28/2017 3:06 PM, Don Brutzman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
cc: group<br>
<br>
On 5/25/2017 3:02 PM, John Carlson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Don,<br>
<br>
I’m kind of anxious to get MFStrings with commas as whitespace between SFStrings handled in X3dToJson.xslt.  Maybe make that your first priority when you get some time, because it will likely impact others using X3dToJson.xslt and testing X3DJSON.  Thanks!<br>
</blockquote>
<br>
ok, tried to understand this issue.  problem isolation follows.  this didn't come up for me earlier because typically the example archives don't use commas as whitespace.<br>
<br>
am working with test scene at<br>
<br>
<a href="http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/conte<wbr>nt/examples/Basic/X3dSpecifica<wbr>tions/StringArrayEncodingExamp<wbr>lesIndex.html</a><br>
<br>
The following seemed to convert OK with commas inserted, but then saw the problem:<br>
<br>
<Shape><br>
   <Text string='"One, Two, Three","","He said, \"Immel did it!\""'><br>
     <FontStyle justify='"MIDDLE","MIDDLE"' style='BOLD'/><br>
   </Text><br>
   <Appearance><br>
     <Material diffuseColor='0.6 0.4 0.2'/><br>
   </Appearance><br>
</Shape><br>
<br>
{ "Shape":<br>
   {<br>
     "-geometry":<br>
       { "Text":<br>
         {<br>
           "@string":["One, Two, Three\",\"\",\"He said, \"Immel did it!\""],<br>
           "-fontStyle":<br>
             { "FontStyle":<br>
               {<br>
                 "@justify":["MIDDLE\",\"MIDDL<wbr>E"],<br>
                 "@style":"BOLD"<br>
               }<br>
             }<br>
         }<br>
       },<br>
<br>
conversion console log follows.<br>
<br>
==============================<wbr>==============================<wbr>==============================<wbr>==============<br>
processScenes.json:<br>
stylesheet compiled=false<br>
C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\<wbr>content\examples\Basic/X3dSpec<wbr>ifications//StringArrayEncodin<wbr>gExamples.x3d processing with X3dToJson stylesheet<br>
C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\<wbr>content\examples\Basic/X3dSpec<wbr>ifications//StringArrayEncodin<wbr>gExamples.json validation checking with jslint<br>
C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\<wbr>content\examples\Basic/X3dSpec<wbr>ifications//StringArrayEncodin<wbr>gExamples.json validation checking with json-schema-validator<br>
--- BEGIN C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\<wbr>content\examples\Basic\X3dSpec<wbr>ifications\StringArrayEncoding<wbr>Examples.json---<br>
validation: FAILURE<br>
[ {<br>
   "level" : "error",<br>
   "schema" : {<br>
     "loadingURI" : "file:/C:/x3d-code/<a href="http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json#" rel="noreferrer" target="_blank">www.web3d.o<wbr>rg/specifications/x3d-3.3-JSON<wbr>Schema.json#</a>",<br>
     "pointer" : "/definitions/@justify/items/0<wbr>"<br>
   },<br>
   "instance" : {<br>
     "pointer" : "/X3D/Scene/-children/2/Shape/<wbr>-geometry/Text/-fontStyle/Font<wbr>Style/@justify/0"<br>
   },<br>
   "domain" : "validation",<br>
   "keyword" : "enum",<br>
   "message" : "instance value (\"MIDDLE\\\",\\\"MIDDLE\") not found in enum (possible values: [\"BEGIN\",\"END\",\"FIRST\",\<wbr>"MIDDLE\",\"\"])",<br>
   "value" : "MIDDLE\",\"MIDDLE",<br>
   "enum" : [ "BEGIN", "END", "FIRST", "MIDDLE", "" ]<br>
} ]<br>
--- END C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\<wbr>content\examples\Basic\X3dSpec<wbr>ifications\StringArrayEncoding<wbr>Examples.json---<br>
==============================<wbr>==============================<wbr>==============================<wbr>==============<br>
<br>
I think the json schema is telling us that this is the JSON-output culprit:<br>
<br>
     "@justify":["MIDDLE\",\"MIDDL<wbr>E"],<br>
<br>
specifically<br>
<br>
     "MIDDLE\",\"MIDDLE"<br>
<br>
the value should be unescaped in the middle, instead appearing as<br>
<br>
     "MIDDLE","MIDDLE"<br>
<br>
... thanks for continued testing, i'll work on this case next.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Holger, you could also change your examples to use a space and not a comma.  Thanks!<br>
<br>
Right now, it’s \"ing the interior "’s<br>
</blockquote>
am working to make things handle all legal syntax.  so no adjustment of legal content is desired, that will just hide problems.<br>
<br>
all the best, Don<br>
</blockquote>
<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" value="+18316562149" target="_blank">+1.831.656.2149</a><br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzma<wbr>n</a><br>
</blockquote></div></div>