[x3d-public] Apologies for X3dJson.xslt snafu

John Carlson yottzumm at gmail.com
Tue Jan 18 20:39:34 PST 2022


Okay. I think I got the right file download.  I don't see anything
different on my local subversion reposiitory:
```
$ diff X3dToJson\ \(1\).xslt /c/x3d-code/
www.web3d.org/x3d/stylesheets/X3dToJson.xslt
[no output]
```
Next:
``
$ diff X3dToJson\ \(1\).xslt /c/x3d-code/
www.web3d.org/x3d/stylesheets/java/lib/stylesheets/X3dToJson.xslt |wc
   2114   13318  164475
```
2114 lines of patch.  Why is there so much to patch in the latter example.
I really feel like I want to dig into the jars...to find some honey? I feel
scratchy like a Pooh Bear after the gorse bush.

I have been using the former, but I don't get the same results you have in
the X3D examples archives.  I can't access many JSON files in
SourceForge...can you recommend one that has NavigationInfo.type correct?
I've already put out my flower child. I don't have any diffs or updates
left in subversion.

Here's the status of X3DJSONLD Currently:
```
john at DESKTOP-8OPL3IE MINGW64 /c/x3d-code/www.web3d.org/x3d/stylesheets
$ cp X3dToJson.xslt ~/X3DJSONLD/src/main/lib/stylesheets/

john at DESKTOP-8OPL3IE MINGW64 /c/x3d-code/www.web3d.org/x3d/stylesheets
$ cd ~/X3DJSONLD/src/main/lib/stylesheets/

john at DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/lib/stylesheets (master)
$ git diff .
```

Let's choose an X3D file, Here's one:  Downloading the X3D model and
copying it to my working folder:
 Conformance Nist X3D Examples Archive, Bindable Nodes, Navigation Info,
jumpcut loadurl (web3d.org)
<https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/NavigationInfo/jumpcut_loadurlIndex.html>
```
john at DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/lib/stylesheets (master)
$ cp ~/Downloads/jumpcut_loadurl.x3d ../../data

john at DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/lib/stylesheets (master)
$ cd ../../data

john at DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/data (master)
$ cd ../shell/

john at DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/shell (master)
$ bash several.sh ../data/jumpcut_loadurl.x3d
[ tons of information[

john at DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/shell (master)
$ cd ../data
```
View JSON file in terminal:


[image: image.png]

Looks wrong, correct?  Validate jumpcut_loadurl.json file at bottom and
folder in title bar.

Now we go back to web3d.org.  Click on the json link.

[image: image.png]

The NavigationInfo looks different between the onine version and my
terminal emulator right?

What is Happening? As you say.

This is why I want to dig in to jars.  I've already boiled the XML -> JSON
process down to stylesheets, if you want to revisit that. I do use
RunSaxon.java, which is different that xslt3 (which doesn't work) and the
saxon jar (I think I'm up-to-date there).

```
$ grep saxon ~/X3DJSONLD/src/main/java/net/coderextreme/RunSaxon.java

net.sf.saxon.Transform.main(new String[] {

net.sf.saxon.Transform.main(new String[] {

$ jar -tf X3DJSAIL.4.0.full.jar |grep net.sf.saxon.Transform
net/sf/saxon/Transform$TransformThread.class
net/sf/saxon/Transform.class
net/sf/saxon/TransformerFactoryImpl.class

$ jar -tf X3DJSAIL.4.0.full.jar |grep X3dToJson.xslt
stylesheets/X3dToJson.xslt

john at DESKTOP-8OPL3IE MINGW64 ~/pythonSAI (master)
$ jar -xf X3DJSAIL.4.0.full.jar stylesheets/X3dToJson.xslt

john at DESKTOP-8OPL3IE MINGW64 ~/pythonSAI (master)
$ cd stylesheets/


john at DESKTOP-8OPL3IE MINGW64 ~/pythonSAI (master)
$ diff X3dToJson.xslt /c/x3d-code/
www.web3d.org/x3d/stylesheets/java/lib/stylesheets/X3dToJson.xslt
[ tons of output ]

john at DESKTOP-8OPL3IE MINGW64 ~/pythonSAI/stylesheets (master)
$ diff X3dToJson.xslt /c/x3d-code/
www.web3d.org/x3d/stylesheets/java/lib/stylesheets/X3dToJson.xslt
[tons of output]

john at DESKTOP-8OPL3IE MINGW64 ~/pythonSAI/stylesheets (master)
$ cp X3dToJson.xslt ..

john at DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/shell (master)
$ bash several.sh ../data/jumpcut_loadurl.x3d
```
The important thing here is I found another version of X3dToJson.xslt in
the ~/pythonSAI folder...but I don't think that helps.

Try again:
```

john at DESKTOP-8OPL3IE MINGW64 /c/x3d-code/www.web3d.org/x3d/stylesheets
$ diff X3dToJson.xslt ~/pythonSAI/X3dToJson.xslt

john at DESKTOP-8OPL3IE MINGW64 /c/x3d-code/www.web3d.org/x3d/stylesheets
$ diff X3dToJson.xslt ~/pythonSAI/stylesheets/

john at DESKTOP-8OPL3IE MINGW64 /c/x3d-code/www.web3d.org/x3d/stylesheets
$ diff X3dToJson.xslt ~/X3DJSONLD/src/main/lib/stylesheets/
```
Are there any other comparisons to make? IDK at this point.  There's a
maven repository! No difference from published.

Will now download X3DJSAIL jar from web.

This is interesting. Do you expect people to download from the Web?
Because Microsoft blocked Java on Edge.   Death to Java!  Long live
TypeScript!
[image: image.png]

So I'm concluding you're using a stylesheet in a jar that no casual user
can download!

On Tue, Jan 18, 2022 at 8:08 PM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:

> John, as ever, all of the latest is on sourceforge in version control.
>
>
>
> “Digging into jars” is certainly not recommended.  We are not burying
> treasure, we are publishing openly.
>
>
> Correct name of stylesheet: X3dToJson.xslt meaning that it transforms .x3d
> models (in XML) to .json
>
>
>
> See the “Code” button which is two buttons to the left of the (suddenly
> popular) “Tickets” button.
>
>
>
>    - https://sourceforge.net/projects/x3d
>    - https://sourceforge.net/p/x3d/code/HEAD/tree
>    -
>    https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets
>    -
>    https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/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 https://
> faculty.nps.edu/brutzman
>
>
>
> *From:* x3d-public <x3d-public-bounces at web3d.org> *On Behalf Of *John
> Carlson
> *Sent:* Tuesday, January 18, 2022 5:04 PM
> *To:* X3D Graphics public mailing list <x3d-public at web3d.org>
> *Subject:* [x3d-public] Apologies for X3dJson.xslt snafu
>
>
>
> I apologize for my behavior and I now understand people’s reactions.   I
> understand that both possible X3dToJson.xslt files may be out of date.
> Can someone send me a stylesheet that produces Navigation.type as a JSON
> array and also has #sourceCode?  It doesn’t have to be checked in or
> anything, and I won’t save it in my repos.   I just need these two fixes to
> get past X3D JSON Schema without 2 validation alerts per X3D JSON file in
> my web app.  (Don’t ask, “Why two?”)
>
>
>
> Humbly trying to progress, willing to take responsibility.
>
>
>
> If no one responds, I will start digging into jars.
>
>
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220118/9f17b178/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 22527 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220118/9f17b178/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 74197 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220118/9f17b178/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 33170 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220118/9f17b178/attachment-0005.png>


More information about the x3d-public mailing list