[x3d-public] X3dToJson.xslt dropping newlines from ECMAScript source code.

Don Brutzman brutzman at nps.edu
Wed Jan 31 22:01:21 PST 2018


As discussed, codebase restored.  Back to the fray...

On 1/26/2018 5:19 AM, John Carlson wrote:
> Losing spaces entirely in JSON output:
> 
> $ diff HelloWorldProgramOutput.json HelloWorldProgramOutput.Nashorn.json
> 
> 369c369
> 
> <                               "#comment":"alternative XML encoding: Text string='\"One, Two, Three\" \"\" \"He said, \\"Immel did it!\\"\"'"
> 
> ---
> 
>  >                               "#comment":"alternative XML encoding: Text string='\"One, Two, Three\"\"\"\"He said, \\"Immel did it!\\"\"'"
> 
> Maybe I should have been happy with comments as they were?  Yipes!

Very good catch, noticing missing spaces there.  Great work.

I have remedied the missing cases in X3dToJson.xslt and the case for missing spaces now appear to be handled.  change checked in, deployment upload in progress.

"@DEF":"ProxyShape",
"-children":[
   {
	"#comment":"alternative XML encoding: Text string='\"One, Two, Three\", \"\", \"He said, \\"Immel did it!\\"\"'"
   },
   {
	"#comment":"alternative Java source: .setString(new String [] {\"One, Two, Three\", \"\", \"He said, \\\"Immel did it!\\\"\"})"
   },
   {
	"#comment":"reference: http://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/StringArrayEncodingExamplesIndex.html"
   }
],

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



More information about the x3d-public mailing list