[Telepathy-commits] [telepathy-spec/master] doc-generator.xsl: fix checking for requirement of array-name on types
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Sep 9 06:49:17 PDT 2008
---
tools/doc-generator.xsl | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/tools/doc-generator.xsl b/tools/doc-generator.xsl
index 7761453..73c4d80 100644
--- a/tools/doc-generator.xsl
+++ b/tools/doc-generator.xsl
@@ -798,13 +798,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</xsl:choose>
</xsl:variable>
- <xsl:variable name="type-of-tp-type">
- <xsl:if test="contains($tp-type, '[]')">
- <!-- one 'a', plus one for each [ after the [], and delete all ] -->
- <xsl:value-of select="concat('a',
- translate(substring-after($tp-type, '[]'), '[]', 'a'))"/>
- </xsl:if>
-
+ <xsl:variable name="type-of-single-tp-type">
<xsl:choose>
<xsl:when test="//tp:simple-type[@name=$single-type]">
<xsl:value-of select="string(//tp:simple-type[@name=$single-type]/@type)"/>
@@ -842,6 +836,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</xsl:choose>
</xsl:variable>
+ <xsl:variable name="type-of-tp-type">
+ <xsl:if test="contains($tp-type, '[]')">
+ <!-- one 'a', plus one for each [ after the [], and delete all ] -->
+ <xsl:value-of select="concat('a',
+ translate(substring-after($tp-type, '[]'), '[]', 'a'))"/>
+ </xsl:if>
+ <xsl:value-of select="$type-of-single-tp-type"/>
+ </xsl:variable>
+
<xsl:if test="string($type) != '' and
string($type-of-tp-type) != string($type)">
<xsl:message terminate="yes">
@@ -858,7 +861,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<xsl:if test="contains($tp-type, '[]')">
<xsl:call-template name="tp-type-array-usage-check">
<xsl:with-param name="single-type" select="$single-type"/>
- <xsl:with-param name="type-of-tp-type" select="$type-of-tp-type"/>
+ <xsl:with-param name="type-of-single-tp-type"
+ select="$type-of-single-tp-type"/>
</xsl:call-template>
</xsl:if>
@@ -868,7 +872,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<xsl:template name="tp-type-array-usage-check">
<xsl:param name="single-type"/>
- <xsl:param name="type-of-tp-type"/>
+ <xsl:param name="type-of-single-tp-type"/>
<xsl:variable name="array-name">
<xsl:choose>
@@ -887,7 +891,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</xsl:choose>
</xsl:variable>
- <xsl:if test="not(contains('ybnqiuxtdsvog', $type-of-tp-type))">
+ <xsl:if test="not(contains('ybnqiuxtdsvog', $type-of-single-tp-type))">
<xsl:if test="not($array-name) or $array-name=''">
<xsl:message terminate="yes">
<xsl:text>No array-name specified for complex type </xsl:text>
--
1.5.6.3
More information about the Telepathy-commits
mailing list