Fwd: Re: Annotation in introspection XML <arg> elements?

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Nov 11 03:59:47 PST 2014


On 10/11/14 20:01, rony wrote:
> On 10.11.2014 19:08, Lennart Poettering wrote:
>> I noticed that colord exposes <annotation> elements in the XML
>> introspection data, inside <arg> elements.

I think it would be fine to allow this.

> However a kind request for a URL to the official standard for the freedesktop.org Introspection
> DTD/XSD, it seems I cannot locate it.

doc/introspect.dtd in dbus.git is probably the canonical version.

If there is a canonical way to update the copy used by
standards.freedesktop.org, I don't know it; given that I do basically
all the dbus releases, in practice this means the copy used by
standards.freedesktop.org does not get updated for new dbus releases.

On 10/11/14 21:29, Lennart Poettering wrote:
> 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?

Has anyone ever validated introspection XML against a DTD, except as a
stick with which to beat implementations that are in some way
pedantically non-compliant?

(In case it isn't obvious, I don't think the DTD is particularly useful;
reading the spec text is necessary to understand the semantics anyway,
and the semantics are the thing that matters.)

The main roles of introspection XML seem to be:

* a simple IDL used by code generators
* misleading people who don't understand D-Bus into thinking it's
  some XML-based protocol like XMLRPC or SOAP
* "documentation" for tools like d-feet

As far as I'm aware, none of those derive a great deal of benefit from
the existence of an official DTD.

    S



More information about the dbus mailing list