Inlining, name scoping, defining

Linas Vepstas ([email protected])
Tue, 11 Oct 1994 18:53:01 -0500


Re: Brygg's proposal:

WWWInline
-- inline the indicated http address

There is a name scoping issue here that no one touched on. Suppose
that the indicated http address is a VRML, and that it has a bunch
DEF's in it. Are we free to USE these newly defined DEF's in the
current document? What if the owner of the remote document changed
and blew away a DEF we were depending on? What if they recently
added a DEF that overrides a DEF that we were using?

Is this something that should be protected against, or is this
a caveat emptor situation?

--------------------
In fact, is WWWInline or WWWFile really needed? Why not just support
the syntax

USE http://www.dead.net/treasure_chest/skulls.vrml#one_eyed_skull

where we assume that skulls.vrml has a DEF one_eyed_skull ... {...}
in it?

--------------------
Suppose that skulls.vrml in fact has a veritable stockpile of interesting
object definitions. If I wanted to use two of them, e.g.

USE http://www.dead.net/treasure_chest/skulls.vrml#one_eyed_skull
USE http://www.dead.net/treasure_chest/skulls.vrml#three_eyed_skull

this could result in two wire transfers. I now ask the WWW server experts:
would it be easier to have the WWW server send ONLY the one_eyed_skull
and three_eyed_skull poritions of the skulls.vrml file, or would it be
easier to ship out the whole file, and have the client side suck out
the relevent portion?

--------------------
Could we add some keyword that would define a named object, without
necessarily implying that it should be drawn? That way, I could
pull in a file of object definitions, but only draw/"USE" the ones
that I want.

(The way I understand WWWInline and DEF is that today, DEF will always
cause the defined object to be drawn, and WWWInline will always pull
in the entire file. Thus,I see no way of doing this, except through
a horrible HACK: Inline the file into some coordinates that will
surely be culled, and then USEing only the pieces I'm intersted in.
Yech.)

--linas