Fwd: Re: Annotation in introspection XML <arg> elements?
Lennart Poettering
mzqohf at 0pointer.de
Mon Nov 10 13:29:07 PST 2014
On Mon, 10.11.14 21:01, rony (rony at wu.ac.at) wrote:
> On 10.11.2014 19:08, Lennart Poettering wrote:
> > Heya,
> >
> > I noticed that colord exposes <annotation> elements in the XML
> > introspection data, inside <arg> elements. Example:
> >
> > <method name="CreateProfileWithFd">
> > <arg type="s" name="profile_id" direction="in">
> > </arg>
> > <arg type="s" name="scope" direction="in">
> > </arg>
> > <arg type="h" name="handle" direction="in">
> > </arg>
> > <arg type="a{ss}" name="properties" direction="in">
> > <annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="CdStringMap">
> > </annotation>
> > </arg>
> > <arg type="o" name="object_path" direction="out">
> > </arg>
> > </method>
> >
> > The current specification says:
> >
> > Method, interface, property, and signal elements may have
> > "annotations", which are generic key/value pairs of metadata.
> >
> > It doesn't list <arg> elements in that paragraph...
> >
> > The DTD we ship also doesn't allow annotations within <arg>.
> >
> > Now, I am not sure I want to know qhat the qtdbus annotations are
> > supposed to do (it looks very questionnable as it appears to encode
> > the parameter index to base 0 in the annotation which seems pretty
> > redundant), but I am pretty sure they are not in accordance with the
> > D-Bus spec right now.
> >
> > Two options:
> >
> > a) file a bug against colord/qt to remove the annotations and generate
> > valid XML data according to the spec and DTD.
> >
> > b) amend the dbus spec/DTD to allow what colord/qt are doing there.
> >
> > Opinions?
>
> Sorry, no opinions (not feeling competent).
>
> However a kind request for a URL to the official standard for the freedesktop.org Introspection
> DTD/XSD, it seems I cannot locate it.
http://standards.freedesktop.org/dbus/1.0/introspect.dtd
That said, the spec uses this in the doctype:
http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd
Which redirects to the first link.
Which brings us to another question, what should the dbus spec
reference in the doctype there? The URL or the new one?
The spec also claims a "more formal DTD needs writing", but it still
references this one. I wonder if that sentence should be updated too?
Lennart
--
Lennart Poettering, Red Hat
More information about the dbus
mailing list