[x3d-public] FW: X3DJSAIL: Getting many of theseunderChemicalMarkupLanguage.Willinvestigate later.
yottzumm at gmail.com
yottzumm at gmail.com
Fri Mar 10 17:07:14 PST 2017
Sent from Mail for Windows 10
From: yottzumm at gmail.com
Sent: Friday, March 10, 2017 8:05 PM
To: john at carlsonsolutiondesign.com
Subject: RE: X3DJSAIL: Getting many of theseunderChemicalMarkupLanguage.Willinvestigate later.
This mod to X3DJSAIL stylesheet fixed my problem. The fix might cause other problems.
John
$ svn diff
Index: CreateX3dSceneAccessInterfaceJava.xslt
===================================================================
--- CreateX3dSceneAccessInterfaceJava.xslt (revision 24364)
+++ CreateX3dSceneAccessInterfaceJava.xslt (working copy)
@@ -11755,7 +11755,7 @@
.replace("<","<") // escape less-than < signs
.replace(">",">") // escape greater-than > signs in XML attributes
.replace("'","'") // escape apostrophes since XML attributes in this output are delimited by apostrophes
- .replace("\"","\\""); // escape embedded quotation marks
+ .replace("\"","""); // escape embedded quotation marks
}
/**
@@ -11788,10 +11788,10 @@
for (int i = 0; i < MFString.length; i++)
{
if (!MFString[i].startsWith("\""))
- result.append("\"");
+ result.append(""");
result.append(String.valueOf(SFStringObject.toStringX3D(MFString[i]))); // apply escaping to each SFString value
if (!MFString[i].startsWith("\""))
- result.append("\"");
+ result.append(""");
if (i < MFString.length - 1)
result.append(" ");
}
Sent from Mail for Windows 10
From: yottzumm at gmail.com
Sent: Thursday, March 9, 2017 5:07 PM
To: john at carlsonsolutiondesign.com
Subject: RE: X3DJSAIL: Getting many of these underChemicalMarkupLanguage.Willinvestigate later.
This appears to be a problem with the Java Serializer for MFStrings, or what’s handling MFStrings in the JSON to DOM translation. But it also appears in the original X3D. So I don’t quite know what to do, except deal with quot in the MFString handler in the JavaSerializer.js, which I have yet to do.
John
www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Oxytocin.java
fieldValue name=txt warning: wrapped missing "quote marks" around single-string value for MFString @value='"Oxytocin: "' and be sure to fix source file!
diff -w www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Oxytocin.json www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Oxytocin.new.json
www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/PyruvicAcid.java
fieldValue name=txt warning: wrapped missing "quote marks" around single-string value for MFString @value='"Pyruvic Acid: C3 H4 O3"' and be sure to fix source file!
fieldValue name=txt warning: wrapped missing "quote marks" around single-string value for MFString @value='"molecule weight: 88.06"' and be sure to fix source file!
fieldValue name=txt warning: wrapped missing "quote marks" around single-string value for MFString @value='"melting point: 12"' and be sure to fix source file!
fieldValue name=txt warning: wrapped missing "quote marks" around single-string value for MFString @value='"boiling point: 165"' and be sure to fix source file!
fieldValue name=txt warning: wrapped missing "quote marks" around single-string value for MFString @value='"specific gravity: 1.265"' and be sure to fix source file!
diff -w www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/PyruvicAcid.json www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/PyruvicAcid.new.json
www_web3d_org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Riboflavin.java
fieldValue name=txt warning: wrapped missing "quote marks" around single-string value for MFString @value='"Riboflavin: "' and be sure to fix source file!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170310/7aa21923/attachment-0001.html>
More information about the x3d-public
mailing list