[x3d-public] Can you make X3dToJson.xslt work with this file? multiple \"\"\"

Joe D Williams joedwil at earthlink.net
Mon May 22 09:21:57 PDT 2017

but not
 <Text DEF='TextMessage' string='"Hello""world!"'>
 <Text DEF='TextMessage' string='"Hello""""world!"'>

 <Text DEF='TextMessage' string=' "Hello" " " "" "world!" '>

 <Text DEF='TextMessage' string='"Hello"
"world!" '>

 <Text DEF='TextMessage' string='"Hello","","world!" '>

 <Text DEF='TextMessage' string='"Hello" " " "world!" '>

 <Text DEF='TextMessage' string='"Hello" "our amazing" "world!"'>

 <Text DEF='TextMessage' string='"R is 

For All MFs a space or the comma seps between SFs are acceptable.
Excess spaces or crlfs or newlines between SFs don't count, only the 
next SF start or a comma counts; if comma then next comma is error; 
for text SF only the next proper quote matters, commas do count

Text MFs may omit space between SFs

OK for input, not for output

preferred output:
 <Text DEF='TextMessage' string='"Hello","world!"'>


----- Original Message ----- 
From: "Don Brutzman" <brutzman at nps.edu>
To: "John Carlson" <yottzumm at gmail.com>
Cc: "X3D Graphics public mailing list" <x3d-public at web3d.org>
Sent: Saturday, May 20, 2017 4:30 PM
Subject: Re: [x3d-public] Can you make X3dToJson.xslt work with this 
file? multiple \"\"\"

> On 5/19/2017 1:37 PM, John Carlson wrote:
>> Thanks.  Version of X3dToJson.xslt is attached.  I am thinking 
>> \"\"\&quot might be something to match.
> 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.
> 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.
> 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.
> for your text.x3d example:
> <Text string='"Node\"\"\""'>
> becomes
> "@string":["Node\"\"\""],
> as expected.
> I then tried to handle adjacent SFString values in an MFString list 
> without intervening whitespace.
> can handle typical
> <Text DEF='TextMessage' string='"Hello" "world!"'>
> or
> <Text DEF='TextMessage' string='"Hello" "" "world!"'>
> but not
> <Text DEF='TextMessage' string='"Hello""world!"'>
> or
> <Text DEF='TextMessage' string='"Hello""""world!"'>
> 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.
> X3dToJson.xslt changes checked in, will update json .zip tonight.
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br 
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA 
> +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics 
> http://faculty.nps.edu/brutzman


> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

More information about the x3d-public mailing list