mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 09:58:07 +02:00
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=86162 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
699fbe8df6
commit
f354940111
3 changed files with 8 additions and 2 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue