<div dir="auto">Don, I just want to make sure you're fixing the Ecmascript.  I am less concerned about comments, except to make them arrays.<div dir="auto"><br></div><div dir="auto">John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mar 19, 2018 12:58 AM, "Don Brutzman" <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">John, thanks for the error reports, was able to spend some more time on those.<br>
<br>
I think I've finally fixed the longstanding X3dToJson.xslt woes with escaping of quote marks.  The essential problem was trying to treat escaping of SFString values the same as escaping of comments.  That recursion block is now split into two separate blocks.<br>
<br>
Escaping of comments is actually much easier, only have to worry about characters \ and " plus combinations thereof.  Even more careful choreography is now engineered into the XSLT stylesheet.<br>
<br>
Initial test cases pass satisfactorily.  Have checked in X3dToJson.xslt modifications (which generates all JSON for X3DJSAIL and examples).<br>
<br>
First updated from subversion to ensure that any nashorn modifications from you are pulled down, and then deployed update to X3DJSAIL.<br>
<br>
Have further made some minor improvements in X3dToX3dom.xslt to support X3DOM capabilities in X3D Validator.<br>
<br>
Also added regex tests in X3D Validator to check for presence of proper .css and .js entries.  Press "Validate" on:<br>
<a href="https://savage.nps.edu/X3dValidator?url=http://www.web3d.org/x3d/content/examples/HelloWorldX3dom.xhtml" rel="noreferrer" target="_blank">https://savage.nps.edu/X3dVali<wbr>dator?url=http://www.web3d.<wbr>org/x3d/content/examples/<wbr>HelloWorldX3dom.xhtml</a><br>
<br>
Testing uncovered an emergent flaw in the X3D JSON schema which is still requiring ProtoInstance USE to have a @name (but that name field is no longer allowed/required).<br>
<br>
Also running updates overnight on all examples on all JSON conversions of X3D Examples Archives, which includes jsonlint and X3D JSON Schema testing throughout - fingers crossed!  So far so good, will upload new builds during work tomorrow.<br>
<br>
Am not applying the following patch since prior problems seem to be handled separately by these various changes.<br>
<br>
Recommend refresh and review.  When convenient, please let me know what you think.<br>
<br>
So... back in motion to good effect.  Have fun with X3D JSON, X3DJSAIL and X3D Validator!  8)<br>
<br>
<br>
On 3/17/2018 2:03 PM, John Carlson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Possibly related to this patch…what do you think?   Web site appears okay, so I am confused.  My local build has problems, ran ant all in x3d/stylesheets/java.   Files not updating in java/examples, so puzzled.  Website appears okay.  Files in x3d/stylesheets/java/classes up to date, but still have same issue.  Hmm.  May try flipping this back.   Most successful with my DOM2JSONSerializer (no stylesheet).  Worst time going through a Java X3DJSAIL program to produce JSON.<br>
<br>
What process generates the JSON on the website for java/examples? <a href="http://www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/style<wbr>sheets/java/examples/HelloWorl<wbr>dProgramOutput.json</a>  that looks ideal, AFAICT.<br>
<br>
John<br>
<br>
$ svn diff X3d*<br>
<br>
Index: X3dToJson.xslt<br>
<br>
==============================<wbr>==============================<wbr>=======<br>
<br>
--- X3dToJson.xslt      (revision 26501)<br>
<br>
+++ X3dToJson.xslt      (working copy)<br>
<br>
@@ -73,7 +73,7 @@<br>
<br>
      <xsl:param name="stripComments"><xsl:text<wbr>>false</xsl:text></xsl:param><br>
<br>
      <xsl:param name="stripDefaultAttributes"><wbr><xsl:text>true</xsl:text></xsl<wbr>:param><br>
<br>
      <xsl:param name="indentEnabled"><xsl:text<wbr>>true</xsl:text></xsl:param><br>
<br>
-    <xsl:param name="normalizeCommentWhitespa<wbr>ce"><xsl:text>true</xsl:text><<wbr>/xsl:param><br>
<br>
+    <xsl:param name="normalizeCommentWhitespa<wbr>ce"><xsl:text>false</xsl:text><wbr></xsl:param><br>
<br>
      <xsl:param name="sourceText"><xsl:text>st<wbr>rings</xsl:text></xsl:param> <!-- escaped | strings | plaintext --><br>
<br>
      <xsl:param name="traceEnabled" ><xsl:text>false</xsl:text></x<wbr>sl:param><br>
<br>
      <xsl:param name="traceScripts" ><xsl:text>false</xsl:text></x<wbr>sl:param><br>
<br>
John<br>
<br>
Sent from Mail <<a href="https://go.microsoft.com/fwlink/?LinkId=550986" rel="noreferrer" target="_blank">https://go.microsoft.com/fwli<wbr>nk/?LinkId=550986</a>> for Windows 10<br>
<br>
*From: *John Carlson <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>><br>
*Sent: *Saturday, March 17, 2018 3:33 PM<br>
*To: *Don Brutzman <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>; <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a> <mailto:<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
*Subject: *Bad ECMAScript in X3DJSAIL JSON output<br>
<br>
See overrunning comments in ECMAScript in x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/sty<wbr>lesheets/java/examples/HelloWo<wbr>rldProgramOutput.json</a><br>
</blockquote>
<br>
<br>
all the best, Don<font color="#888888"><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>
<br>
</font></blockquote></div><br></div>