[x3d-public] X3DJSAIL toFileJavaScript bugs (help!) possible problem withconfiguration of X3dToJson.xslt

John Carlson yottzumm at gmail.com
Mon Nov 6 14:32:18 PST 2017


Here is the generated Java:

            .addValue(new MetadataStringObject().setName("escapedQuotesTest1").setValue(new MFStringObject("\"escaped quotation marks example 1: He said, \\\"Immel did it!\\\"\"")))

And here’s the original handwritten Java that generated the Java:

                   metadataStringsSet.addValue(new MetadataStringObject().setName("escapedQuotesTest1").setValue(
                                                                   "escaped quotation marks example 1: He said, \"Immel did it!\""));

Sent from Mail for Windows 10

From: John Carlson
Sent: Sunday, November 5, 2017 11:14 PM
To: x3d-public at web3d.org; Don Brutzman
Subject: X3DJSAIL toFileJavaScript bugs (help!) possible problem withconfiguration of X3dToJson.xslt

Previous x3d.stylesheets.patch.gz linked in previous message.  Includes handling of long lines in JSON conversion by setting Native Java Stylesheet in toFileJavaScript.

JSON conversion appears wrong in another way.  There may be a configuration setting.  toFileJavaScript is generating bad JavaScript objects.  I am getting JS like this, which I think is wrong:

                                      "@value":["escaped quotation marks example 1: He said, \\"Immel did it!\\""]

It should be:

                                      "@value":["escaped quotation marks example 1: He said, \"Immel did it!\""]


Please patch www.web3d.org/x3d/stylesheets and run

$ ant create.X3DJSAIL test-nashorn

JavaScript is previously linked gzipped.  Normal JSON conversion appears fine, last I checked.

Advice on possible configuration settings welcome!  I can set them in toFileJavaScript.

John


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20171106/74e4c0fe/attachment.html>


More information about the x3d-public mailing list