This is widely used in practice (especially by GLib — just look at files
in /usr/share/dbus-1/interfaces/), and there is no reason not to allow
it. Update the specification, introspection DTD and XSL file to allow
and represent it.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86162
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
</itemizedlist>
</para>
<para>
- Method, interface, property, and signal elements may have
+ Method, interface, property, signal, and argument elements may have
"annotations", which are generic key/value pairs of metadata.
They are similar conceptually to Java's annotations and C# attributes.
Well-known annotations:
<!ELEMENT signal (arg|annotation)*>
<!ATTLIST signal name CDATA #REQUIRED>
-<!ELEMENT arg EMPTY>
+<!ELEMENT arg (annotation)*>
<!ATTLIST arg name CDATA #IMPLIED>
<!ATTLIST arg type CDATA #REQUIRED>
<!-- Method arguments SHOULD include "direction",
<span class="type"><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
<span class="symbol"><xsl:value-of select="@name"/></span><xsl:text> </xsl:text>
+
+ <xsl:if test="annotation">
+ <ul>
+ <xsl:apply-templates select="annotation"/>
+ </ul>
+ </xsl:if>
</li>
</xsl:for-each>
</ul>