summaryrefslogtreecommitdiff
path: root/tools/doc-generator.xsl
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-07-01 13:25:11 +0000
committerMarc-André Lureau <marcandre.lureau@gmail.com>2009-02-13 00:01:43 +0200
commit5dff30ce4162d493e9f580249a2057c4579e73a4 (patch)
treebc07f8ad96670165728391d04f71ae0c26968666 /tools/doc-generator.xsl
parentb9438ea91342a3e958cfc1d376cc6f58013a327d (diff)
doc-generator.xsl: fail if a property does not have a type, does not have a name, or is not an immediate child of an interface
Diffstat (limited to 'tools/doc-generator.xsl')
-rw-r--r--tools/doc-generator.xsl29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/doc-generator.xsl b/tools/doc-generator.xsl
index c202af4..330c0cf 100644
--- a/tools/doc-generator.xsl
+++ b/tools/doc-generator.xsl
@@ -375,6 +375,35 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</xsl:template>
<xsl:template match="property">
+
+ <xsl:if test="not(parent::interface)">
+ <xsl:message terminate="yes">
+ <xsl:text>ERR: property </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text> does not have an interface as parent&#10;</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:if test="not(@name) or @name = ''">
+ <xsl:message terminate="yes">
+ <xsl:text>ERR: missing @name on property </xsl:text>
+ <xsl:value-of select="concat(../@name, '.', @name)"/>
+ <xsl:text>: '</xsl:text>
+ <xsl:value-of select="@access"/>
+ <xsl:text>'&#10;</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:if test="not(@type) or @type = ''">
+ <xsl:message terminate="yes">
+ <xsl:text>ERR: missing @type on property </xsl:text>
+ <xsl:value-of select="concat(../@name, '.', @name)"/>
+ <xsl:text>: '</xsl:text>
+ <xsl:value-of select="@access"/>
+ <xsl:text>'&#10;</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
<dt xmlns="http://www.w3.org/1999/xhtml">
<a name="{concat(../@name, '.', @name)}">
<code><xsl:value-of select="@name"/></code>