summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorOlli Salli <olli.salli@collabora.co.uk>2008-08-24 19:17:54 +0300
committerMarc-André Lureau <marcandre.lureau@gmail.com>2009-02-13 00:01:44 +0200
commitbe568432789bccedc1736fe80e5c910ef7cbdad9 (patch)
tree24d1e45800e23b72cb92796c92deb9b6375cf98e /tools
parente8fba25c5509898d987d165bbb1d1da2837889f0 (diff)
Add check for @name-for-bindings being consistent with @name
Diffstat (limited to 'tools')
-rw-r--r--tools/doc-generator.xsl20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/doc-generator.xsl b/tools/doc-generator.xsl
index 76fc969..8f1f772 100644
--- a/tools/doc-generator.xsl
+++ b/tools/doc-generator.xsl
@@ -417,8 +417,24 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</dl>
</xsl:template>
+ <xsl:template name="binding-name-check">
+ <xsl:if test="@tp:name-for-bindings">
+ <xsl:if test="translate(@tp:name-for-bindings, '_', '') != @name">
+ <xsl:message terminate="yes">
+ <xsl:text>ERR: Binding name </xsl:text>
+ <xsl:value-of select="@tp:name-for-bindings"/>
+ <xsl:text> doesn't correspond to D-Bus name </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:message>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template match="property">
+ <xsl:call-template name="binding-name-check"/>
+
<xsl:if test="not(parent::interface)">
<xsl:message terminate="yes">
<xsl:text>ERR: property </xsl:text>
@@ -649,6 +665,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<xsl:template match="method">
+ <xsl:call-template name="binding-name-check"/>
+
<xsl:if test="not(parent::interface)">
<xsl:message terminate="yes">
<xsl:text>ERR: method </xsl:text>
@@ -916,6 +934,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<xsl:template match="signal">
+ <xsl:call-template name="binding-name-check"/>
+
<xsl:if test="not(parent::interface)">
<xsl:message terminate="yes">
<xsl:text>ERR: signal </xsl:text>