>
>Allowing them to leak across files will, I guarantee, cause massive headaches
>for implementors.
>
>Imagine a file that contains:
>
> LOD {
> ranges [ ... ]
> WWWInline { name "http://...." } # DEF Foo inside there
> }
> USE Foo
>
>The beauty of VRML is that an implementation can decide to defer the loading
>of the stuff in the WWWInline node until the user is close enough to see it.
>
>If you allow DEF/USE to leak across files, that is lost. And once that is
>lost, the infinite scalability of VRML is lost.
>
I'm not quite sure I follow you. As long as everything is parsed first (not
nesessarily loaded) why is that lost? In fact, going through some
pseudo-code in my head, I'm sure I am missing your point. After parsing the
initially required stuff, if there were unresolved externals, you would just
nest deeper until they were resolved. Loading is still deferred until the
user is close enough to see it. Surely I must be missing something.
>If you really want the functionality of being able to refer to objects DEF'ed
>in other files, then create a new kind of WWWInline that refers to part of a
>file instead of the whole thing. I don't think that's worth it-- you can
>always put the parts of your objects/worlds that you want to refer to from
>other objects/worlds in separate files.
No, that definitely doesn't seem worth it to me. It's WWWInline specific
while DEF and USE are not. Certainly, parsing becomes more interesting but I
can't see it affecting performance. It just seems like lexical scoping to me.
>
>There's already a syntax for that:
> Switch { DEF Foo .... }
>
>The default for a Switch node is to traverse none of its children, so you've
>DEF'ed the node without USE'ing it. Put several DEF's under the switch if
>that's convenient...
>
Pefect, it seemed strange that there wouldn't be this functionality. None of
Foo will be traversed? Are there rules for parsing it? I assume that it is
fully parsed.
Robert