Hello,

In DBus introspection XML files we write by hand, we use XML namespaces
to put in various additional bits of information. Something very similar
is done in the Telepathy project. It looks like this:
http://cgit.freedesktop.org/telepathy/telepathy-idle/tree/extensions/Connection_Interface_Renaming.xml

Now, it turns out Glib DBus introspection code fails in the presence of
XML namespaces. The error I am getting from
g_dbus_node_info_new_for_xml() is:
attribute 'xmlns:ns' invalid for element 'node'
The code in question is in gio/gdbusintrospection.c, but the error comes
from g_markup_collect_attributes() in glib/gmarkup.c. It's not that
GMarkup can't parse attributes with colon in the name, it's just that
g_markup_collect_attributes() treats the presence of extra arguments
besides those being requested as an error. That behaviour is not
configurable.

So, I've got two options at this point. I can either write my own
introspection XML parsing code or I can modify Glib code to ignore any
unexpected attributes. I don't mean modifying the behaviour of
g_markup_collect_attributes() but rather stopping using it in
gdbusintrospection.c.
My question is, would such a change be acceptable for inclusion into Glib?

-- 
Joseph Artsimovich
Software Engineer at YouView TV Ltd

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to