[x3d-public] Rereported problem with X3dToJson.xslt

Don Brutzman brutzman at nps.edu
Thu Jul 27 10:58:14 PDT 2017


Regression tests and uploads for all .x3d to .json conversions successful.

	http://www.web3d.org/x3d/content/examples/X3dResources.html#Examples

	http://www.web3d.org/x3d/content/examples/build.log.json.txt

	http://www.web3d.org/x3d/content/examples/X3dExampleArchivesJsonScenes.zip


On 7/26/2017 11:44 PM, Don Brutzman wrote:
> On 7/21/2017 9:31 PM, John Carlson wrote:
>> See X3D XML and attached (bad) JSON.
> 
> thanks.  found loophole, added a case.  stylesheet modification checked in.  test results attached.
> 
>      <Text string='"Node2" "\\" "\\\\" "Node2"'>
> 
> now translates into JSON as
> 
>      "Text":
>      {
>         "@string":["Node2","\\","\\\\","Node2"],
> 
>> There are a lot of cases to handle I guess.
> uh, yup!   :0
> 
> for your amusement, debug console for successful test handled by new rule [3.5]
> ===============================================================================
> ant -f C:\\x3d-code\\www.web3d.org\\x3d\\stylesheets test.text
> test.mkdir:
> test.text:
> =====================================
> translation input: test/text.x3d
> ..expected output: test/text.json
> [e-q-c-r][1.0][e-q-c-r input][local-name()=profile]Immersive[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=version]3.3[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=noNamespaceSchemaLocation]http://www.web3d.org/specifications/x3d-3.3.xsd[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=name]creator[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=content]John W Carlson[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=name]created[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=content]December 13 2015[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=name]title[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=content]text.x3d[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=name]identifier[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=content]https://coderextreme.net/X3DJSONLD/text.x3d[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=name]description[inputType=SFString]
> normalizing: test \n text
> [e-q-c-r][9][e-q-c-r input][local-name()=content]test \n text[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=name]generator[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=content]Vim, X3D-Edit, https://savage.nps.edu/X3D-Edit[inputType=SFString]
> [e-q-c-r][4.2][e-q-c-r input][local-name()=string]"Node\"\"\""[inputType=MFString]
> [e-q-c-r][3.4][e-q-c-r input][local-name()=string]Node\"\"\""[inputType=MFString]
> [e-q-c-r][3.4][e-q-c-r input][local-name()=string]\"\""[inputType=MFString]
> [e-q-c-r][3.4][e-q-c-r input][local-name()=string]\""[inputType=MFString]
> [e-q-c-r][4.0][e-q-c-r input][local-name()=string]"[inputType=MFString]
> [e-q-c-r][4.2][e-q-c-r input][local-name()=string]"Node2" "\\" "\\\\" "Node2"[inputType=MFString]
> [e-q-c-r][6][e-q-c-r input][local-name()=string]Node2" "\\" "\\\\" "Node2"[inputType=MFString]
> [e-q-c-r][3.5][e-q-c-r input][local-name()=string]\\" "\\\\" "Node2"[inputType=MFString]
> [e-q-c-r][4.1][e-q-c-r input][local-name()=string]" "\\\\" "Node2"[inputType=MFString]
> [e-q-c-r][3.5][e-q-c-r input][local-name()=string]\\\\" "Node2"[inputType=MFString]
> [e-q-c-r][3.5][e-q-c-r input][local-name()=string]\\" "Node2"[inputType=MFString]
> [e-q-c-r][4.1][e-q-c-r input][local-name()=string]" "Node2"[inputType=MFString]
> [e-q-c-r][8.1][e-q-c-r input][local-name()=string]Node2"[inputType=MFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=string][inputType=MFString]
> [e-q-c-r][4.2][e-q-c-r input][local-name()=string]"Node3 \\\\ \\ " "Node3\"\"\""[inputType=MFString]
> [e-q-c-r][3.5][e-q-c-r input][local-name()=string]Node3 \\\\ \\ " "Node3\"\"\""[inputType=MFString]
> [e-q-c-r][3.5][e-q-c-r input][local-name()=string]\\ \\ " "Node3\"\"\""[inputType=MFString]
> [e-q-c-r][3.5][e-q-c-r input][local-name()=string] \\ " "Node3\"\"\""[inputType=MFString]
> [e-q-c-r][4.1][e-q-c-r input][local-name()=string] " "Node3\"\"\""[inputType=MFString]
> [e-q-c-r][3.4][e-q-c-r input][local-name()=string]Node3\"\"\""[inputType=MFString]
> [e-q-c-r][3.4][e-q-c-r input][local-name()=string]\"\""[inputType=MFString]
> [e-q-c-r][3.4][e-q-c-r input][local-name()=string]\""[inputType=MFString]
> [e-q-c-r][4.0][e-q-c-r input][local-name()=string]"[inputType=MFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=name]frontUrls[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=type]MFString[inputType=SFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=accessType]initializeOnly[inputType=SFString]
> [e-q-c-r][4.2][e-q-c-r input][local-name()=value]"rnl_front.png" "uffizi_front.png"[inputType=MFString]
> [e-q-c-r][6][e-q-c-r input][local-name()=value]rnl_front.png" "uffizi_front.png"[inputType=MFString]
> [e-q-c-r][8.1][e-q-c-r input][local-name()=value]uffizi_front.png"[inputType=MFString]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=value][inputType=MFString]
> Script contains CDATA source-code text, copied as "#sourceText" using "strings" mode
> [e-q-c-r][8.3][e-q-c-r input][local-name()=]ecmascript:
>                  var me = '"1" "\"2" "\n3"';[inputType=unknown]
> [e-q-c-r][8.3][e-q-c-r input][local-name()=]1" "\"2" "\n3"';[inputType=unknown]
> [e-q-c-r][8.3][e-q-c-r input][local-name()=] "\"2" "\n3"';[inputType=unknown]
> [e-q-c-r][3.4][e-q-c-r input][local-name()=]\"2" "\n3"';[inputType=unknown]
> [e-q-c-r][8.3][e-q-c-r input][local-name()=]2" "\n3"';[inputType=unknown]
> [e-q-c-r][8.3][e-q-c-r input][local-name()=] "\n3"';[inputType=unknown]
> [e-q-c-r][8.3][e-q-c-r input][local-name()=]\n3"';[inputType=unknown]
> [e-q-c-r][1.0][e-q-c-r input][local-name()=]';[inputType=unknown]
> ..error checking with jslint
> ..error checking with json-schema-validator
> --- BEGIN C:\x3d-code\www.web3d.org\x3d\stylesheets\test\HelloWorld.json---
> validation: SUCCESS
> --- END C:\x3d-code\www.web3d.org\x3d\stylesheets\test\HelloWorld.json---
> BUILD SUCCESSFUL (total time: 4 seconds)
> ===============================================================================
> 
> thanks for another excellent test case.  am rerunning all json conversions tonight for regression test.
> 
> all the best, Don


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