Hi list,

Just out of curiosity: why does libglade2 depend on libxml2?

I admit I am somewhat ignorant about the internals of libglade2, but at first 
glance I could not find anything that could not also be done with 
GMarkupParser, which is part of GLib. Or am I missing something here?

Admittedly GMarkupParser is not quite as refined as libxml2 - especially in 
the error handling -, but then: if the .glade file is faulty, you're in 
trouble anyway. The .glade XML files don't seem to use things like namespaces 
or non-standard entities either, so GMarkupParser should be able to handle 
them just fine, at least as far as I can see.

libxml2 is 924 kB of size on my system. I think getting rid of this particular 
dependency would be quite nice. Of course it doesn't make much difference for 
full-fledged GNOME apps, but for Gtk+-only applications it seems a worthwhile 
optimisation, and might make libglade more attractive for applications that 
are designed to run also in memory-restricted environments (e.g. embedded 
systems etc.).  Getting rid of libxml2 should decrease application start-up 
time as well (although I am not sure how relevant this is on modern desktop 
systems).

Any thoughts on this?

I've tried to make libglade2 use GMarkupContext instead of libxml2.  Attached 
a first, tentative patch that should achieve this. So far it seems to work 
fine, even though it has not gotten too much testing.

Cheers
-Tim






Attachment: libglade-2.0-nolibxml2-2004-Jan-07.diff.bz2
Description: BZip2 compressed data

Reply via email to