<div dir="auto">All I can remember is I wrote callback hell for ExternProtoDeclare in the JSON Proto Expander.   It had some way to handle a list of URLs.   Likely that code is in X3DOM.   Maybe under loadUrls?</div><div dir="auto"><br></div><div dir="auto">If you can’t find it,  I’ll look at src/main/node in X3DJSONLD.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 19, 2022 at 8:36 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">x3dom currently lacks support for back-up urls to use if the first<br>
urls do not work. I am trying to add support and wonder how to deal<br>
with corner cases.<br>
<br>
The spirit of the spec. here is pretty clear:<br>
<a href="https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/networking.html#X3DUrlObject" rel="noreferrer" target="_blank">https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/networking.html#X3DUrlObject</a><br>
<br>
says that a url which cannot be located or if the retrieved data<br>
cannot be interpreted should be skipped. Subsequent urls are then used<br>
as back-ups.<br>
<br>
Currently, x3dom checks if an inline x3d url can be parsed as xml and<br>
if so if it has a Scene element.<br>
<br>
The first corner case happens if there is a X3D element but it does<br>
not contain a Scene element. This could be interpreted to mean an<br>
empty X3D document with an empty Scene, or that it perhaps should be<br>
skipped as not interpretable. I would probably favor skipping as this<br>
would normally happen by mistake.<br>
<br>
The second corner case is a Scene element without content. Should such<br>
X3D be considered interpretable ?  I think x3dom is currently set up<br>
to parse it without error resulting in an empty Scene, probably with<br>
default NavigationInfo and Viewpoint. So this could be considered<br>
interpretable and not be skipped.<br>
<br>
<a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#urls" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#urls</a><br>
<br>
says a result needs to be "legal". But legal is by definition what is<br>
provided in the spec., eg. comes down to being interpretable.<br>
<br>
The tooltip at <a href="https://www.web3d.org/x3d/content/X3dTooltips.html#Inline.url" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/X3dTooltips.html#Inline.url</a><br>
<br>
does not seem to further clarify.<br>
<br>
Any feedback appreciated,<br>
<br>
Andreas<br>
<br>
--<br>
Andreas Plesch<br>
Waltham, MA 02453<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>