On Fri, Mar 16, 2007 at 07:39:44PM -0400, Reed Hedges wrote:

> > So, it sounds to me like you want to append file A and file B to produce 
> > file C, and that some of those pieces in file B are intended to modify 
> > pieces of file A.  I see why you might want to do that.
> 
> Sort of. Here's an example of what I was thinking of:
> 
>   <load file="3dworld.cod/xod/whatever" />
>   <vobject parent="/obj-from-file" type="ex:extra">
>     ...
>   </vobject>
> 
>   <extend ref="/obj-from-file" type="ex:weird-type" />

Oh, I see.  I think we've been arguing at cross purposes, because in 
fact the <load> tag in XOD already has a few commands special to it that 
do most of what you want:

  <load file="3dworld.cod">
    <!-- change site name of an object in the file -->
    <rename from="objectA" to="objectB" /> 

    <!-- add fileref as a child to current parent -->
    <link name="foo" fileref="objectC" /> 

    <!-- add a link to "objectD" going to "mine"
    <linkout fileref="objectD" name="bar" child="mine" />

    <!-- add a link from "mine" to "objectE" -->
    <linkin parent="mine" name="baz" fileref="objectE" />
  </load>

If we added an <addtype> command, which would be quite easy, then that 
should do what you want.

I should mention that in this case it makes sense to store it as a 
series of commands because they do in fact represent a set of edits that 
are made at run time to an existing external structure.  We're not 
declaring a new vobject structure from scratch in this case.

> > Well, I feel like it should be more purely declarative and reflected by 
> > the DOM structure, and not require that you have to in effect execute a 
> > stream of commands 1, 2, 3, 4, 5, 6 in a specific order scattered around 
> > the file to reconstruct the vobject structure.  
> 
> This being what COD is, sort of, right?

Parts of it, yes.  The parts I'm less happy about.

> Anyway, eventually when we have OTDs we could use those OTDs to generate
> DTDs or Schemas and be able to say
> 
> <a3dl:sector name="world">
>   <a3dl:object3d_sphere name="foo">
>     <property name="a3dl:position">0 0 0</property>
>     <a3dl:material name="a3dl:material">
>       ...
>     </a3dl:material>
>   </a3dl:object3D_sphere>
> </a3dl:sector>

Yes!  Exactly!  That would enable people to use VOS to create and use 
domain-specific languages very easily.

> Which would really be using XML to the fullest.  Except for when you
> want a Vobject to have two types, then we need some other way to do
> that, like
>   <multitype-vobject name="foo">
>    <a3dl:object3d_sphere>
>      ...object3d-related children...
>    </a3dl:object3d_sphere>
>    <misc:metadata>
>      ... metadata ...
>    </misc:metadata>
>   </multitype-vobject>
> 
> or some other way of using seperate XML elements for different types.

I hadn't really thought about it, but that seems like it would be a 
reasonable way to do it.

-- 
[   Peter Amstutz  ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]

Attachment: signature.asc
Description: Digital signature

_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

Reply via email to