Commit f3549401 authored by Philip Withnall's avatar Philip Withnall Committed by Simon McVittie

spec: Allow <annotation> in <arg> elements in introspection XML

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=86162Reviewed-by: 's avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent 699fbe8d
......@@ -4045,7 +4045,7 @@
</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:
......
......@@ -16,7 +16,7 @@
<!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",
......
......@@ -80,6 +80,12 @@
<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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment