]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
spec: Allow <annotation> in <arg> elements in introspection XML
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Sat, 1 Oct 2016 11:47:27 +0000 (13:47 +0200)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 3 Oct 2016 10:33:47 +0000 (11:33 +0100)
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>
doc/dbus-specification.xml
doc/introspect.dtd
doc/introspect.xsl

index b747c0bfee106465e68e1f4cf526c597e078f560..ca4f8699017d231f34a1a36b22215a4df90e0a11 100644 (file)
       </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:
index ba263d326075c491f1a3ce350e88da4d72f0aa5c..4d396f987a554987c0bb19dd8644f6b39546b310 100644 (file)
@@ -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",
index 52604a5c52357847913e19eeba6c5613ac95eee8..89b6844180c86f917d7e17baa40de2597cc80370 100644 (file)
                       
                       <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>