[x3d-public] Fwd: New X3D JSON Loader that is namespace unaware

clement at igonet.fr clement at igonet.fr
Sat Mar 12 22:13:27 PST 2016


OK John, thank you for the job, I'll test it very soon.

NB: I'm working on an earth viewer from open street map data converted to x3d json tiles. So, I really need and appreciate your work.

Clément


Le 13 mars 2016 02:52:52 UTC+01:00, John Carlson <yottzumm at gmail.com> a écrit :
>
>
>> Begin forwarded message:
>> 
>> From: John Carlson <john.carlson3 at sbcglobal.net>
>> Subject: New X3D JSON Loader that is namespace unaware
>> Date: March 12, 2016 at 8:52:25 PM EST
>> To: Clement IGONET <clement at igonet.fr>, Don Brutzman
><brutzman at nps.edu>, Roy Walmsley <roy.walmsley at ntlworld.com>
>> Cc: x3dom mlist <x3dom-users at lists.sourceforge.net>
>> 
>> I have stripped out the namespace functionality out of the X3DJSON
>loader.  It was too problematic. After I generate the XML, I do the
>following JavaScript:
>> 
>>                 var serializer = new XMLSerializer();
>>                 var xmlstr = serializer.serializeToString(child);
>> 
>>                 // get rid of self-closing tags
>>                 xmlstr = xmlstr.replace(/(<[
>\t]*)([A-Za-z0-9]+)([^>]*)\/>/g, "$1$2$3></$2>");
>>                 // strip out namespace
>>                 xmlstr = xmlstr.replace(/xmlns="[^"]*"/g, "");
>> 
>>                 // strip out schema
>>                 xmlstr =
>xmlstr.replace(/xsd:noNamespaceSchemaLocation="[^"]*"/g, "");
>> 
>> I am happy to report that the X3DJSON loader works with Cobweb in
>Chrome now (yay!).  The major problem appeared to be the specification
>of the X3D XML schema, for those of you trying to incorporate your X3D
>into Cobweb.  Cobweb or the browser gets tired of loading scenes after
>a while, it appears.
>> 
>> 
>> Note that while I am getting good results on some files, some of *my*
>files aren’t working and I’m going to do more research.  This is just
>to announce that I’ve removed namespaces from my code (although the xml
>serializer still produces it).
>> 
>> https://github.com/coderextreme/X3DJSONLD/
><https://github.com/coderextreme/X3DJSONLD/>
>> http://coderextreme.net/X3DJSONLD/
><http://coderextreme.net/X3DJSONLD/>
>> 
>> John
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>x3d-public mailing list
>x3d-public at web3d.org
>http://web3d.org/mailman/listinfo/x3d-public_web3d.org

clement at igonet.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160313/c5846370/attachment-0001.html>


More information about the x3d-public mailing list