diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-06-07 11:54:18 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-06-07 11:54:18 +0000 |
commit | 8cf5cc956cdbb0bbbf6f486ce8413259aa3cc8f5 (patch) | |
tree | 02942903e2ece6b6031108d3c6e71c7d9f9e7ab4 /tools | |
parent | d5d6baaa9159bd75bf1b861792b456e3c6186a76 (diff) |
c-constants-generator.xsl: make mixed-case-prefix param mandatory
Diffstat (limited to 'tools')
-rw-r--r-- | tools/c-constants-generator.xsl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/c-constants-generator.xsl b/tools/c-constants-generator.xsl index 64b72e61..a7a2a4fc 100644 --- a/tools/c-constants-generator.xsl +++ b/tools/c-constants-generator.xsl @@ -23,12 +23,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. <xsl:output method="text" indent="no" encoding="ascii"/> - <xsl:param name="mixed-case-prefix" select="'Tp'"/> - <xsl:param name="upper-case-prefix" select="'TP_'"/> + <xsl:param name="mixed-case-prefix" select="''"/> <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/> <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/> + <xsl:variable name="upper-case-prefix" select="concat(translate($mixed-case-prefix, $lower, $upper), '_')"/> + <xsl:variable name="lower-case-prefix" select="concat(translate($mixed-case-prefix, $upper, $lower), '_')"/> + + <xsl:template match="tp:flags"> <xsl:variable name="name"> <xsl:choose> @@ -213,7 +216,12 @@ but <xsl:value-of select="$name"/> is less than the previous value <xsl:template match="text()"/> - <xsl:template match="/tp:spec">/* Generated from the Telepathy spec, version <xsl:value-of select="tp:version"/><xsl:text> + <xsl:template match="/tp:spec"> + <xsl:if test="$mixed-case-prefix = ''"> + <xsl:message terminate="yes"> + <xsl:text>mixed-case-prefix param must be set </xsl:text> + </xsl:message> + </xsl:if> </xsl:text><xsl:for-each select="tp:copyright"> <xsl:value-of select="."/><xsl:text> |