<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">sadly freewrl goes down the list untill file found then stops, regardless if the contents are the right type or parse.<div><div>DEF II Inline</div><div>{</div><div> # will it get to cone.wrl? stops at (found) gif, displays black screen. </div><div> url [ "../helpers/back.gif" "../cone.wrl" "../empty.wrl" "../no_exist.wrl"]</div><div>}</div></div><div>gets to cone.wrl:</div><div> url [ "../no_exist.wrl" "../cone.wrl" "../empty.wrl" ]</div><div>stops at empty.wrl:</div><div>url [ "../empty.wrl" "../cone.wrl" ]<br></div><div>empty.wrl:</div><div>#VRML V2.0 utf8 <br></div><div>So it seems to be designed for when resources have moved relative to scene file, for example</div><div>url["red.png" "helpers/red.png" "<a href="http://hostsite.com/scenery/helpers/red.png">http://hostsite.com/scenery/helpers/red.png</a>"]</div><div>would save you from reworking your urls when you move from one site -localhost- to a public server during scene development.</div><div>-Doug</div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 19, 2022 at 7: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:1px solid rgb(204,204,204);padding-left:1ex">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>