[Telepathy-commits] [telepathy-spec/master] Add check for @name-for-bindings being consistent with @name
Olli Salli
olli.salli at collabora.co.uk
Tue Sep 9 08:53:22 PDT 2008
---
tools/doc-generator.xsl | 20 ++++++++++++++++++++
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> </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>
--
1.5.6.3
More information about the Telepathy-commits
mailing list