<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>Thanks bunches.  Am eager to try, but still have my mind stuck on loading loads of subscenes eay for Clement, without having to specify Inlines.  Trying to figure out how to do element.addEventQuerySelector() for all missing selected elements.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Joh</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:brutzman@nps.edu">Don Brutzman</a><br><b>Sent: </b>Saturday, May 20, 2017 9:31 PM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a>; <a href="mailto:roy.walmsley@ntlworld.com">Roy Walmsley</a><br><b>Subject: </b>Re: Can you make X3dToJson.xslt work with this file? multiple \"\"\"</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 5/20/2017 4:42 PM, John Carlson wrote:</p><p class=MsoNormal>> Can you at least keep the \n handling?  I was hoping for that one I think.  That’s the nextChar code.  I can send again, if desired.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>OK sounds good.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I restored the following block (more complete) from a prior version:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><!-- special characters backspace, formfeed, newline, carriage return, horizontal tab are presumably character entities already --></p><p class=MsoNormal><!-- page links for character entities http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#HTML --></p><p class=MsoNormal><!-- http://www.w3schools.com/js/js_strings.asp --></p><p class=MsoNormal><xsl:when test="($nextCharAfterBackslash = '/') or</p><p class=MsoNormal>                                ($nextCharAfterBackslash = 'n') or</p><p class=MsoNormal>                                ($nextCharAfterBackslash = 'r') or</p><p class=MsoNormal>                                ($nextCharAfterBackslash = 't') or</p><p class=MsoNormal>                                ($nextCharAfterBackslash = 'b') or</p><p class=MsoNormal>                                ($nextCharAfterBackslash = 'f')"></p><p class=MsoNormal>                <xsl:if test="$debugTrace"><xsl:message><xsl:text>[e-b-c-r][23.5]</xsl:text><xsl:value-of select="$debugMessage"/></xsl:message></xsl:if></p><p class=MsoNormal>                <xsl:value-of select="substring-before($inputString,'\')"/></p><p class=MsoNormal>                <xsl:text disable-output-escaping="yes">\</xsl:text></p><p class=MsoNormal>                <xsl:value-of select="$nextCharAfterBackslash"/></p><p class=MsoNormal>                <xsl:call-template name="escape-backslash-characters-recurse"></p><p class=MsoNormal>                  <xsl:with-param name="inputString" select="$remainder"/></p><p class=MsoNormal>                </xsl:call-template></p><p class=MsoNormal></xsl:when></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Example conversion attached, looks like it handled literal \n characters in Script source OK.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>excerpts:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>"                tracePrint ('      keyValueOrientation[k+1]=' + keyValueOrientation[k+1].toString() + '\n');",</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>"         Browser.print ('[CameraMovement] ' + outputString + '\n');",</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>etc.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10</p><p class=MsoNormal>> </p><p class=MsoNormal>> *From: *Don Brutzman <mailto:brutzman@nps.edu></p><p class=MsoNormal>> *Sent: *Saturday, May 20, 2017 7:31 PM</p><p class=MsoNormal>> *To: *John Carlson <mailto:yottzumm@gmail.com></p><p class=MsoNormal>> *Cc: *X3D Graphics public mailing list <mailto:x3d-public@web3d.org>; Roy Walmsley <mailto:roy.walmsley@ntlworld.com></p><p class=MsoNormal>> *Subject: *Re: Can you make X3dToJson.xslt work with this file? multiple \"\"\"</p><p class=MsoNormal>> </p><p class=MsoNormal>> On 5/19/2017 1:37 PM, John Carlson wrote:</p><p class=MsoNormal>> </p><p class=MsoNormal>>  > Thanks.  Version of X3dToJson.xslt is attached.  I am thinking \&quot;\&quot;\&quot might be something to match.</p><p class=MsoNormal>> </p><p class=MsoNormal>> Thanks for the stylesheet effort.  I kept the parts that strip html tags and x3dom's specialized <X3D> attributes, we can continue on that another day.</p><p class=MsoNormal>> </p><p class=MsoNormal>> The other parts for MFString recurision I wasn't really able to use.  The existing logic is quite complex/subtle, adding another branch would have been very hard to debug/maintain.  Instead used the debugging traces and improved the existing logic.  This is especially tricky because first you have to get through escape-backslash-characters-recurse template before continuing with escape-quote-characters-recurse template.</p><p class=MsoNormal>> </p><p class=MsoNormal>> Took some doing but I got your special example to work, apparently without breaking anything else.  X3D for Advanced Modeling passes, others are in progress.</p><p class=MsoNormal>> </p><p class=MsoNormal>> for your text.x3d example:</p><p class=MsoNormal>> </p><p class=MsoNormal>>                  <Text string='"Node\"\"\""'></p><p class=MsoNormal>> </p><p class=MsoNormal>> becomes</p><p class=MsoNormal>> </p><p class=MsoNormal>>                  "@string":["Node\"\"\""],</p><p class=MsoNormal>> </p><p class=MsoNormal>> as expected.</p><p class=MsoNormal>> </p><p class=MsoNormal>> I then tried to handle adjacent SFString values in an MFString list without intervening whitespace.</p><p class=MsoNormal>> </p><p class=MsoNormal>> can handle typical</p><p class=MsoNormal>> </p><p class=MsoNormal>>                  <Text DEF='TextMessage' string='"Hello" "world!"'></p><p class=MsoNormal>> </p><p class=MsoNormal>> or</p><p class=MsoNormal>> </p><p class=MsoNormal>>                  <Text DEF='TextMessage' string='"Hello" "" "world!"'></p><p class=MsoNormal>> </p><p class=MsoNormal>> but not</p><p class=MsoNormal>> </p><p class=MsoNormal>>                  <Text DEF='TextMessage' string='"Hello""world!"'></p><p class=MsoNormal>> </p><p class=MsoNormal>> or</p><p class=MsoNormal>> </p><p class=MsoNormal>>                  <Text DEF='TextMessage' string='"Hello""""world!"'></p><p class=MsoNormal>> </p><p class=MsoNormal>> need to think about context-free parsing a bit more.  not yet sure how to get there from here.  that special case will require more work, perhaps another day.</p><p class=MsoNormal>> </p><p class=MsoNormal>> X3dToJson.xslt changes checked in, will update json .zip tonight.</p><p class=MsoNormal>> </p><p class=MsoNormal>> all the best, Don</p><p class=MsoNormal>> </p><p class=MsoNormal>> -- </p><p class=MsoNormal>> </p><p class=MsoNormal>> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman@nps.edu</p><p class=MsoNormal>> </p><p class=MsoNormal>> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149</p><p class=MsoNormal>> </p><p class=MsoNormal>> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman</p><p class=MsoNormal>> </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>all the best, Don</p><p class=MsoNormal>-- </p><p class=MsoNormal>Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman@nps.edu</p><p class=MsoNormal>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149</p><p class=MsoNormal>X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>