gdome future II



Hi,

I was supposed to write this mail after Paris' LE but 
I could not find time to do so.
I was lucky enough to meet raph twice during his stay in
Paris and we discussed gdome's future a little.
Anders Carlson has begun to play with gdome (He wrote a 
nice little UI thingy which allows you to browse DOM 
trees).

Raph has recently sent mails here explaining why he wanted 
to change a lot of stuff in Gdome.
Basically, Raph wanted to use his own structures in Gdome
which meant writing a SAX parser.
The idea behind all this was to have a nice inheritance 
hierarchy where Attributes are also Node structures.
(Thsi is not the case in the current gnome-xml codebase)

To solve this, raph decided to wait for Daniel Veillard's 
gnome-xml 2.x which will feature precisely this.
Conclusion: we'll wait for DV to release some beta 2.x code
to introduce the change in gdome.

Rightnow, the idea is to get the gdome's GdomeNode stuff to 
work and drop all the Atrribute stuff. Basically, my proposal
is: 
	remove all the non-GdomeNode code which should 
	inherit code from the GdomeNode stuff from the 
	gdome-xml.c.in file. Actually, this means the Attribute 
	stuff and something else which I don't remember.

Now, we are getting to the last idea of raph:
Gdome supports now static type checking. Raph had obviously
forgotten he had even wrote this. This is achieved through the
frontend which has functions such as : gdome_a_insertNode.
Raph wants to implement dynamic type checking also.
This would mean implementing type checking functions such as:
gdome_is_Node
gdome_is_Attr....
these functions would need a GdomeNode->type field which would
allow us to implement this very easily.
The idea is that the type checking stuff will be VERY simple:
gboolean
gdome_is_node (void *node)
{
/* check node against null */
switch (node->type) {
  case NODE:
  case ATTR:
  /* ... all structs inheriting Node by a mean or another */
    return TRUE;
    break;
  case default:
    return FALSE;
    break;
}

}

Now, we can also implement type casting functions like: 
gdome_n_to_attr
which will test inside is the parameter is an ATTR and will 
cast upopn return.


This is about all we discussed about: raph says this is 
what we want for gdome and I agree.
The type checking/casting stuff can be done now waiting for
gnome-xml 2.x.
However, I'd like to do everything at the same time and I'll be
waiting for DV to release something usable to get back to work 
on gdome myself.


regards,
Mathieu




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