Re: EDIT: URL syntax for portability

Chris Marrin ([email protected])
Fri, 17 Nov 1995 11:20:03 -0800


On Nov 17, 6:22pm, Marco Calamari wrote:
> Subject: EDIT: URL syntax for portability
> Sorry if this is a stupid question, but there is a manner to avoid the
> complete URL specification in WWWInline hyperlinks ?
>
> I'm using Pc, Navigator 2.0 & WebFX 32 bit.
>
> I would be pleased to move around my model without editing all .wrl
files
> to change hostname & path of links.

It is not clearly called out in the VRML spec and I'm not sure if it is
defined in the URL specification but relative URL's should certainly be
possible. WebSpace handles them the same as Netscape. If your URL does
not start with a protocol (e.g. - ghttp:") then the URL is relative to the
parent URL path. This is the URL of the current file minus the part past
the last '/'. Since VRML can be nested this means the URL of the nearest
enclosing file. So if you have a URL:

http://foo.com/usr/doc/file.wrl

and a name in a WWWInline of:

name "other/file2.wrl"

The URL of that file should be:

http://foo.com/usr/doc/other/file2.wrl

A WWWInline contained in that file however, would have:

http://foo.com/usr/doc/other/

as its prefix.

This works even with '..' in the relative path. So another WWWInline in
the original file of:

name "../another/file3.wrl"

would have the full URL of:

http://foo.com/usr/another/file3.wrl

Perhaps all this should be made more clear in the spec, or at least a
pointer could be given to the appropriate URL spec.

-- 
chris marrin      Silicon      http://www.sgi.com/Products/WebFORCE/WebSpace
(415) 390-5367    Graphics     http://reality.sgi.com/employees/cmarrin_engr/
[email protected]   Inc.         

"It is well to remember that the entire universe, with one trifling exception, is composed of others." - John Andrew Holmes


  • Next message: Tim Bray: gMS Iexplorer can't launch WebSpace?"
  • Previous message: Cliff Richard: gdesubscribe www-vrml"
  • Next in thesad: Chris Marrin: gRe: EDIT: URL syntax for portability"