[system-tools]Relax NG Schema and GObject generator



Hello again,
As I've told Carlos Garnacho before, I am currently working on a
project, motivated by GST, to create a XSLT which will generate
GObject's from Relax NG schema.
This might be interesting to this project because:
 a) You get your XML validated (libxml2 supports Relax NG)
 b) You get native mapping for your XML data.

As for point a) i would like you to help me, if possible, in determining
which types are used in each XML element. Whether they are strings,
ints, booleans... I would also like to know if i'm missing any structure
present in your network XML protocol or if i made any typos. The
procedure is very simple, just edit the network.xml file, you'll get it
in no sec.
If you want to know more about Relax NG, here's a small tutorial:
http://relaxng.org/tutorial-20011203.html

Regarding to point b), currently, as you may observe from the sources
I'm sending in attachment, current generated GObject have support
properties and are, hopefully, bug-free. I've made a few tests and
everything seems to be working alright. Since everything is automated
your GObjects are error prone and it takes almost no-time to develop a
XML file.
Just as a matter of comparison the 169 lines XML schema (network.xml)
generated 1870 C code lines with no errors and ready to use :)
My next step is to develop XML data serialization, this way the
generated GObjects can import and export themselves as XML data, this
might prove to be very interesting in this project, and certainly will
be for me ;)

Note: the syntax used in the Relax NG is currently limited, you can only
specify GObjects using something very similar to what's done in
network.xml

Any thoughts, ideas, improvements?

Tiago Cogumbreiro

Attachment: gst.tar.bz2
Description: application/bzip-compressed-tar



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]