[Verse-dev] Saving and Loading

Emil Brink emil at obsession.se
Tue Sep 13 15:19:32 CEST 2005


Here I go again, talking to myself with a few more updates:

> I started yesterday to get this very ad-hoc format formally defined, by 
> applying some standard XML syntax description to it (I know of DTDs, XML 
> Schema, and Relax NG, although I'm most familiar with DTDs). However, 
> that failed. :/ This is because the VML format, as used up to know, is a 
> bit ... too relaxed. It relies on attribute values to control element 
> parsing, which is something I have not been able to express with any of 
> the above-mentioned formalisms.
> 
> So, after brief discussion with Eskil, I will change the format around 
> slightly, so it becomes possible to describe it formally. I feel that a 
> formal definition of the syntax is helpful to have. I will probably use 
> either XML Schema or Relax NG for this.

This has been done, and the format is now specified using XML Schema.

I have a schema done for all node types except audio. :/ The omission
is because the saver cannot save out audio data. This, in turn, is
because the saver uses Enough, and Ehough can't store audio data.

I didn't want to write a "dry" schema without testing it in parallel,
so I've held off, hoping that Enough and the saver will improve.

The loader and saver have been imported into CVS, in the new "vml"
module right here: 
<http://projects.blender.org/viewcvs/viewcvs.cgi/vml/?cvsroot=verse>.

The chronically curious can read the schema/vml.vxd file to see the
XML Schema in all its glory. :)

> I anticipate being able to translate any old-style VML files into the 
> new format very easily, so I hope we can drop support for it from the 
> loader tool rather quickly after these changes have been made.

I haven't done anything in this department, but I still think it's
something that'd be fairly easy to do. Even easier, of course, is to
just use an old version of the loader together with the new saver,
like so:

+--------------+                +--------+               +---------+
| old VML data | > old loader > | server | > new saver > | new VML |
+--------------+                +--------+               +---------+

This takes seconds, if you have an old loader laying about. If anyone
managed to amass a lot of VML data, I can get you the old loader source
so you can make the conversion.

Oh, these tools have not been built in anything but Linux by me; I would
appreciate success/failure reports, and (even more) a Makefile.win32, 
and similar for Mac OS X too of course.

Enjoy,

/Emil


More information about the Verse-dev mailing list