[x3d-public] X3dToJson.xslt -- X3D repository translated remaining JSON parse errors. 3.3 JSON schema file failures. SCRIPTS
Don Brutzman
brutzman at nps.edu
Sat May 6 12:00:28 PDT 2017
summary: following up given latest escaping improvements. most fixed, some problems remain.
On 5/1/2017 11:37 PM, yottzumm at gmail.com wrote:
> $ grep File jsonerrors.txt |grep -v originals|grep -v Test|grep -v LatticeXvl|grep -v save|grep -v Unquoted | awk '{ print $2; }'
>
> C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.json
http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypesIndex.html
http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.x3d
having trouble with nested apostrophes in Script CDATA block.
if (!animated) // output results
{
tracePrint ('<PositionInterpolator DEF=\'CameraPositionInterpolator\' key=\'' + stripBrackets(CameraPI.key) + '\' keyValue=\'' + stripBrackets(CameraPI.keyValue) + '\'/>');
tracePrint ('<OrientationInterpolator DEF=\'CameraOrientationInterpolator\' key=\'' + stripBrackets(CameraOI.key) + '\' keyValue=\'' + stripBrackets(CameraOI.keyValue) + '\'/>');
}
http://www.web3d.org/x3d/content/examples/Basic/development/CameraPrototypes.json
" if (!animated) // output results",
" {",
" tracePrint ('<PositionInterpolator DEF=\'CameraPositionInterpolator\' key=\'' + stripBrackets(CameraPI.key) + '\' keyValue=\'' + stripBrackets(CameraPI.keyValue) + '\'/>');",
" tracePrint ('<OrientationInterpolator DEF=\'CameraOrientationInterpolator\' key=\'' + stripBrackets(CameraOI.key) + '\' keyValue=\'' + stripBrackets(CameraOI.keyValue) + '\'/>');",
" }",
> C:/x3d-code/www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/BaseballBackspin.json
had trouble with double-nested quotes inside a comment
<!-- url=""sound.wav""/> </Sound> -->
didn't seem worth pursuing. we can go there if you want.
> C:/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFont.json
>
> C:/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSize.json
both fixed
http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFontIndex.html
http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFont.json
https://jsonlint.com/?json=http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFont.json
http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSizeIndex.html
http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSize.json
https://jsonlint.com/?json=http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSize.json
> C:/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/development/ModelSanCarlosChurchFeb-3-2012.json
this is in "development" subdirectory there and thus just included as background. troubleshooting not appropriate.
> Please run the conversions on the .x3d files and run through a JSON parser (jsonlint?) and see!
>
> $ egrep '^ file|^ version' jsonerrors.txt | sh combine.sh |grep "3\.3"|grep -v originals| awk '{ print $2; }'
>
> The file below does not pass JSON schema, v 3.3. If it is another version, please label it as so.
>
> keyword: enum
>
> dataPath: .X3D.Scene['-children'][5].Switch['-children'][5].Group['-children'][3].Switch['-children'][0].ProtoInstance.fieldValue[1]['-children'][1].Transform['-children'][8].Transform['-children'][1].Transform['-children'][2].Transform['-children'][0].Shape['-geometry'].Text['-fontStyle'].FontStyle['@justify'][0]
>
> message: should be equal to one of the allowed values
>
> params: {"allowedValues":["BEGIN","END","FIRST","MIDDLE",""]}
>
> file: C:/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/SanCarlosCathedral/SanCarlosCathedralWorkingVersion/SanCarlosCathedral.json
>
> version: 3.3
yes similar approach is used in the ant build.xml process.
> Here is the offending field I think. Is LEFT legal?
not legal
15.4.1 FontStyle
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/text.html#FontStyle
MFString [] justify "BEGIN" ["BEGIN","END","FIRST","MIDDLE",""]
> Should we change the schema?
>
> "@justify":["LEFT","MIDDLE"],
>
> <FontStyle justify='"LEFT" "MIDDLE"' size='0.3'/>
no change needed.
confirmed that X3D Schematron includes a specific warning about changing "LEFT" to "BEGIN".
Fixed offending scene.
> We have many files that are not version 3.3, that have errors against the 3.3 schema. I am not reporting those.
Very good. Future work is autogeneration of earlier JSON sceemas.
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