[x3d-public] added or previously reported problems in X3DJSAIL/X3dToJson.xslt/My Java
John Carlson
yottzumm at gmail.com
Mon May 29 23:46:11 PDT 2017
& gets translated to & in MFStrings (likely a problem in my Java)
src/main/data/ObliqueStrategies.new.json
- "@url":["http://translate.google.com/translate_tts?tl=en&q=Feed%20the%20recording%20back%20out%20of%20the%20medium","translate_tts_mp3FileFormatNotSupported.wav"]
+ "@url":["http://translate.google.com/translate_tts?tl=en&q=Feed%20the%20recording%20back%20out%20of%20the%20medium","translate_tts_mp3FileFormatNotSupported.wav"]
ObliqueStrategies.new.json.intermediate.x3d
url='"http://translate.google.com/translate_tts?tl=en&q=Feed%20the%20recording%20back%20out%20of%20the%20medium" "translate_tts_mp3FileFormatNotSupported.wav"'
ObliqueStrategies.x3d
url='http://translate.google.com/translate_tts?tl=en&q=Feed%20the%20recording%20back%20out%20of%20the%20medium
ObliqueStrategies.new.x3d
url='"http://translate.google.com/translate_tts?tl=en&q=Feed%20the%20recording%20back%20out%20of%20the%20medium" "translate_tts_mp3FileFormatNotSupported.wav"'
ObliqueStrategies.java (likely where the bug is):
new java.lang.String[] {"http://translate.google.com/translate_tts?tl=en&q=Feed%20the%20recording%20back%20out%20of%20the%20medium","translate_tts_mp3FileFormatNotSupported.wav"}
---------------------------------------------------------------------------------------------------------------------------------------------
\\\\ gets translated to \\ in X3DJSAIL in MFStrings, not X3dtoJson.xslt (Problem with MFString String array constructor in X3DJSAIL).
src/main/data/TextSpecialCharacters.new.json
"@DEF":"DefaultText",
- "@string":["Character entity substitutions:","empty string \"\" skips a line:","","apostrophe ' is '","ampersand & is &","quote mark \" is "","backslash \\ is X3D escape character","double backslash \\\\ is X3D backslash \\ character","Pi Î is Π XML character entity"],
+ "@string":["Character entity substitutions:","empty string \"\" skips a line:","","apostrophe ' is '","ampersand & is &","quote mark \" is "","backslash \\ is X3D escape character","double backslash \\ is X3D backslash \\ character","Pi Î is Π XML character entity"],
TextSpecialCharacters.java (mine)
return new MFStringObject(new java.lang.String[] {"Character entity substitutions:","empty string \"\" skips a line:","","apostrophe ' is '","ampersand & is &","quote mark \" is "","backslash \\ is X3D escape character","double backslash \\\\ is X3D backslash \\ character","Pi Π is Π XML character entity"});
TextSpecialCharacters.new.json.intermediate.x3d (note that \\\\ got changed to \\ and \\ got changed to \
string='"Character entity substitutions:" "empty string \"\" skips a line:" "" "apostrophe ' is '" "ampersand & is &" "quote mark \" is "" "backslash \ is X3D escape character" "double backslash \\ is X3D backslash \ character" "Pi Î is Π XML character entity"'
---------------------------------------------------------------------------------------------------------------------------------------------
src/main/data/browser.json (same issue, but with SFString—we need agreement with our Java here)
"@content":"a script test with embedded \n between single quotes, a double backslash \\\\ a backslash \\ and a closing quote \""
browser.new.json
"@content":"a script test with embedded \n between single quotes, a double backslash \\ a backslash \\ and a closing quote \"
browser.new.json.intermediate.x3d
content='a script test with embedded \n between single quotes, a double backslash \\ a backslash \ and a closing quote "'
browser.x3d
content='a script test with embedded \n between single quotes, a double backslash \\\\ a backslash \\ and a closing quote "'
Browser.java (mine):
.addMeta(new metaObject().setName("description").setContent("a script test with embedded \\n between single quotes, a double backslash \\\\ a backslash \\ and a closing quote \"")))
Errors in X3dToJson.xslt
Dealing with \\\\ and more . Attached text.x3d and text.json.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170530/d5da8b7a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text.json
Type: application/json
Size: 4406 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170530/d5da8b7a/attachment.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text.x3d
Type: application/octet-stream
Size: 2151 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170530/d5da8b7a/attachment.obj>
More information about the x3d-public
mailing list