[x3d-public] X3dToJson.xslt vs DOM2JSONSerializer.js
John Carlson
yottzumm at gmail.com
Fri May 8 01:54:32 PDT 2020
Okay, I have put in some tracing code into DOM2JSONSerializer. It appears
that it is traversing up the tree as much as possible, even after it goes
down. So I get to about 23 levels down, and can't proceed much farther.
Seems like I'm playing a game of rogue?
Anyway, If you want to debug my code, it's at:
https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONSerializer.js
I suggest searching for `parentNode`. I'm going to try to get some sleep.
I feel like a newb writing such code. Thanks to people like Joe who make
good test examples, we'll track this down.
None of this affects code in either X_ITE or X3DOM! My code in the
JSONParser does JSON -> XML, not XML to JSON. DOM2JSONSerializer is not in
X_ITE or X3DOM to my knowledge. It does affect the X3DJSONLD.
However, I am somewhat concerned that X_ITE may be "freezing" like my code
when processing XML. It may be worth searching for parentNode in x_ite or
x_ite_dom.
Use Joe's Skin Kick when testing.
John
On Fri, May 8, 2020 at 3:06 AM John Carlson <yottzumm at gmail.com> wrote:
> New node.exe, no luck!
>
> Trying browserify (the --node sets it up for nodejs instead of web
> browser).
>
> $ browserify --node xml2all.js -o foo.js
>
> Still waiting
>
> $ node foo.js ../data/JoeSkinTexcoordDisplacerKick.x3d
>
> hmmm. Guess I'll try WASM next, if possible!
>
> John
>
>
> On Fri, May 8, 2020 at 2:35 AM John Carlson <yottzumm at gmail.com> wrote:
>
>> Hmm. Well, node with 32GB of memory doesn't seem to finish either.
>> Looking into a new node.exe for my system.
>>
>> On Fri, May 8, 2020 at 2:00 AM John Carlson <yottzumm at gmail.com> wrote:
>>
>>> X3dToJson.xslt wins (finishes).
>>>
>>> This is why we don't want to implement the XML/DOM Prototype Expander in
>>> JavaScript (not that this message has anything to do with Prototype
>>> Expanding, more likely my newbie JavaScript experience). I think that
>>> ProtoExpanding on the server can work extremely well.
>>>
>>> The players:
>>>
>>> X3dToJson.xslt (winner)
>>> $ sh don.sh ../data/JoeSkinTexcoordDisplacerKick.x3d
>>>
>>> DOM2JSONSerializer.js (loser)
>>> $ node xml2all.js ../data/JoeSkinTexcoordDisplacerKick.x3d
>>>
>>> 1 Point for XSLT!
>>>
>>> John
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200508/9146465f/attachment.html>
More information about the x3d-public
mailing list