<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8" /></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">OK John, thank you for the job, I'll test it very soon.<br>
<br>
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.<br>
<br>
Clément<br>
<br><br><div class="gmail_quote">Le 13 mars 2016 02:52:52 UTC+01:00, John Carlson <yottzumm@gmail.com> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br class="" /><div><br class="" /><blockquote type="cite" class=""><div class="">Begin forwarded message:</div><br class="Apple-interchange-newline" /><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">John Carlson <<a href="mailto:john.carlson3@sbcglobal.net" class="">john.carlson3@sbcglobal.net</a>><br class="" /></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">New X3D
JSON Loader that is namespace unaware</b><br class="" /></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">March 12, 2016 at 8:52:25 PM EST<br class="" /></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Clement IGONET <<a href="mailto:clement@igonet.fr" class="">clement@igonet.fr</a>>, Don Brutzman <<a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a>>, Roy
Walmsley <<a href="mailto:roy.walmsley@ntlworld.com" class="">roy.walmsley@ntlworld.com</a>><br class="" /></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Cc: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">x3dom mlist <<a href="mailto:x3dom-users@lists.sourceforge.net" class="">x3dom-users@lists.sourceforge.net</a>><br class="" /></span></div><br class="" /><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">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:<div class=""><br class="" /></div><div class=""><div style="margin: 0px; font-size:
11px; line-height: normal; font-family: Menlo;" class="">                var serializer = new XMLSerializer();</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">                var xmlstr = serializer.serializeToString(child);</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class="" /></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">                // get rid of self-closing tags</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">                xmlstr = xmlstr.replace(/(<[ \t]*)([A-Za-z0-9]+)([^>]*)\/>/g, "$1$2$3></$2>");</div><div style="margin: 0px; font-size: 11px; line-height: normal;
font-family: Menlo;" class="">                // strip out namespace</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">                xmlstr = xmlstr.replace(/xmlns="[^"]*"/g, "");</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class="" /></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">                // strip out schema</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">                xmlstr = xmlstr.replace(/xsd:noNamespaceSchemaLocation="[^"]*"/g, "");</div></div><div class=""><br class="" /></div><div class="">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.</div><div class=""><br class="" /></div><div class=""><br class="" /></div><div class="">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).</div><div class=""><br class="" /></div><div class=""><a href="https://github.com/coderextreme/X3DJSONLD/" class="">https://github.com/coderextreme/X3DJSONLD/</a></div><div class=""><a href="http://coderextreme.net/X3DJSONLD/" class="">http://coderextreme.net/X3DJSONLD/</a></div><div class=""><br class="" /></div><div class="">John</div></div></div></blockquote></div><br class="" /><p style="margin-top: 2.5em; margin-bottom: 1em;
border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />x3d-public mailing list<br />x3d-public@web3d.org<br /><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br /></pre></blockquote></div><br>
clement@igonet.fr</body></html>