[x3d-public] Results from jsonlint, X3d archives

Don Brutzman brutzman at nps.edu
Sat Nov 21 10:57:27 PST 2020


All of the examples you listed (minus TestSchematronDiagnostics error model) convert cleanly now.

Stylesheet update checked in.

* https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToJson.xslt

Am running regression tests on all scenes to ensure no unintended side effects have occurred.

Elaboration follows, again thanks for isolating this problem.

On 11/21/2020 12:56 AM, John Carlson wrote:> 
> I am very happy this is being taken care of!  This was one thing on the back burner.
> 
> On Sat, Nov 21, 2020 at 2:04 AM Don Brutzman <brutzman at nps.edu <mailto:brutzman at nps.edu>> wrote:
> 
>     These all look identical so there is probably a single simple bug.
> 
>     Am guessing the superflous comma is related to initial (or solitary) empty string value in an MFString list.
> 
>     Next steps in sleuthing:
> 
>     - pick one or two example models (likely containing MetadataString and Text nodes),

for example, TextFont.x3d

>     - look at original XML for what information is expected,

       <Text string='"" "Medium"'>
         <FontStyle/>
       </Text>

>     - manually translate to show what is expected JSON output,

enjoy

>     - comparison between expected and converted is the error result, localizing the problem.

previous:

               "-geometry":
                 { "Text":
                   {
                     "@string":[,"","Medium"],
                     "-fontStyle":
                       { "FontStyle":
                         {
                         }
                       }
                   }

fixed:
               "-geometry":
                 { "Text":
                   {
                     "@string":["","Medium"],
                     "-fontStyle":
                       { "FontStyle":
                         {
                         }
                       }
                   }


>     - going into stylesheet to fix the conversion logic error is then straightforward.

fixed, now deploying

>     p.s. if you look at TestSchematronDiagnostics you will see that it is nothing but syntax errors for testing purposes, so conversion success is not expected.
> 
>     On 11/20/2020 10:44 PM, John Carlson wrote:
>      >
>      > For a visualization of the errors, I did a grep:
>      >
>      > $ find . -name '*json' -print0|xargs -0 grep '\[,'
>      > ./Basic/development/MetadataPrototypes.json:                                    "@string":[,""],
>      > ./Basic/development/MetadataPrototypes.json:                                    "@string":[,""],
>      > ./Basic/development/TestSchematronDiagnostics.json:                    "@string":[,"",x\" '],
>      > ./ConformanceNist/BindableNodes/Viewpoint/jumpcut_proximitysensor.json:                                "@string":[,""],
>      > ./ConformanceNist/BindableNodes/Viewpoint/viewinline.json:                                      "@string":[,""],
>      > ./Vrml2Sourcebook/Siggraph98Course/Button.json:                      "@value":[,""]
>      > ./Vrml2Sourcebook/Siggraph98Course/Button.json:                      "@value":[,""]
>      > ./Vrml2Sourcebook/Siggraph98Course/Cut.json:                                                "@string":[,""],
>      > ./Vrml2Sourcebook/Siggraph98Course/Loader.json:                  "@value":[,""]
>      > ./Vrml2Sourcebook/Siggraph98Course/Query.json:                          "@string":[,""],
>      > ./Vrml2Sourcebook/Siggraph98Course/TextFont.json:                    "@string":[,"","Sans"],
>      > ./Vrml2Sourcebook/Siggraph98Course/TextFont.json:                    "@string":[,"",,"","Typewriter"],
>      > ./Vrml2Sourcebook/Siggraph98Course/TextSize.json:                    "@string":[,"","Medium"],
>      > ./Vrml2Sourcebook/Siggraph98Course/TextSize.json:                    "@string":[,"","Large"],
>      > ./X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.json:                              "@value":[,""]
>      > ./X3dForWebAuthors/Chapter14Prototypes/HudKelpForest_RoundTrip.json:                              "@value":[,""]
>      >
>      >
>      > On Sat, Nov 21, 2020 at 12:33 AM John Carlson <yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>>> wrote:
>      >
>      >     Many of these are due to-- [,  non-existent first element in an array.   Perhaps there is an issue with X3dToJson.xslt?
>      > [...]
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