[x3d-public] Don's stylesheets win again.

John Carlson yottzumm at gmail.com
Fri Jul 25 11:33:58 PDT 2025


Original JavaScript in X3D file (works):

  text3shapes.x3d:                            var me = '"1" "\"2" "\n3"';

Converted JSON (by X3dToJson.xslt):
  text3shapes.json:"\t\t\t    var me = '\"1\" \"\"2\" \"\n3\"';",

My Java:
  ../java/net/x3djsonld/data/text3shapes.java:                        var
me = '"1" "\"2" "\n3"';

Don's Java

../java/net/coderextreme/data/text3shapes.java:"
 var me = '\"1\" \"\"2\" \"\\n3\"';"))));

JSON output from X3DJSAIL and x3d.py (all fail):

$ grep -h 1.*2.*3 text3shapes.new.*json
"\t\t\t    var me = '\"1\" ""2\" \"\n3\"';",
"\t\t\t    var me = '\"1\" ""2\" \"\n3\"';",
"\t\t\t    var me = '\"1\" ""2\" \"\n3\"';",
"\t\t\t    var me = '\"1\" ""2\" \"\n3\"';",
"\t\t\t    var me = '\"1\" ""2\" \"\n3\"';",
"                      var me = '"1" ""2"
"\n3"';"

Various attempts to produce the correct JavaScript in various bindings
(x3djsonld is Don's stylesheets, coderextreme is my Serializers):

graaljs/net/x3djsonld/data/text3shapes.js:"                         var me
= '\"1\" \"\\\"2\" \"\\n3\"';" + "\n")
graaljs/net/coderextreme/data/text3shapes.js:                       var me
= '\"1\" \"\"2\" \"\\n3\"';`))))      ;
graalpy/net/coderextreme/data/text3shapes.py:                       var me
= '\"1\" \"\"2\" \"\\n3\"';''')
java/net/x3djsonld/data/text3shapes.java:                           var me
= '"1" "\"2" "\n3"';
java/net/coderextreme/data/text3shapes.java:"                       var me
= '\"1\" \"\"2\" \"\\n3\"';"))));
jruby/net/coderextreme/data/text3shapes.rb:"                        var me
= '\"1\" \"\"2\" \"\\n3\"';")            )

I haven't done the JSON output from Don's Java yet, it's disabled!  But I
enabled it for fun:

grep var text3shapes_JavaExport.json
"\t\t\t    var me = '\"1\" ""2\" \"",

No 3???

Here's the original .x3d for your enjoyment, attached!

And it validates!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250725/c87b04c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text3shapes.x3d
Type: model/x3d+xml
Size: 2175 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250725/c87b04c7/attachment.x3d>


More information about the x3d-public mailing list