diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-09-09 14:49:17 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2009-02-13 00:01:45 +0200 |
commit | 71e8c4a5f0bdfccc7c91603b47ddcccf1d43e87c (patch) | |
tree | c6b468376d6298b4b8a909f4a2ea099b50a639b3 /tools | |
parent | c96879e114c43a8e8e9c9f1f9cf1a9bb22fabeb1 (diff) |
doc-generator.xsl: fix checking for requirement of array-name on types
Diffstat (limited to 'tools')
-rw-r--r-- | 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> |