[x3d-public] X3D XML roundtrip through DOM/JS back to XML round-trip testing

John Carlson yottzumm at gmail.com
Sun Aug 30 16:40:52 PDT 2020


The project is at a state where it needs to be tested.  I have caught one
problem:

        "xmlns:xsi":new SFString("http://www.w3.org/2001/XMLSchema-instance
"),
        "xsi:nonamespaceschemalocation":new SFString("
http://www.web3d.org/specifications/x3d-3.3.xsd"),
        width:new SFString("940px"),
        height:new SFString("940px"),
        showLog:new SFBool( true)

Do not get translated to XML. I think it's because these fields are not
listed in X3DUOM, but I'm not sure.

Primarily though, we want to test the XML to XML roundtrip translation. You
can test it like this:

Clone https://github.com/coderextreme/X3DJSONLD and
https://github.com/coderextreme/es6x3d to a folder.

drop your XML files in X3DJSONLD/src/main/data (ex: foo.x3d)

Run your XML files through ECMAScriptSerializer.js:

cd X3DJSONLD/src/main/shell

sh several.sh ../data/foo.x3d
or
sh local.sh

pick up your files (foo.js) found in

X3DJSONLD/src/main/node/net/ecma/data

and copy them to the es6x3d folder (above)

Run your JS files in the es6x3d folder:

node foo.js

Compare XML output to your original.

Next steps are to provide for dual-inheritance with MFNode, SFNode and
non-field classes.

Questions?

Note: there may be an issue with compiling RunSaxon.java I suggest you run
`npm install` in X3DJSONLD folder to install java-npm package and other
necessary packages.

That is, it may require some experience installing the X3DJSONLD project.

Ask here:

yottzumm at gmail.com

On Sat, Aug 29, 2020 at 10:59 PM John Carlson <yottzumm at gmail.com> wrote:

> Here's a status report!
>
> We have 3 things left to do. Collapse individual meta, children, field,
> and connect objects into an array.
>
> Uppercase/CamelCase the scene and proto* properties.
>
> An example hand-edited scene is here:
>
> https://github.com/coderextreme/es6x3d/blob/master/abox.js
>
> We need eyes to compare input XML to output XML.
>
> We also need people to approve the output ECMAScript as complying with SAI
> specs.
>
> Thanks,
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200830/c3748cc5/attachment-0001.html>


More information about the x3d-public mailing list