Open GoogleCodeExporter opened 9 years ago
This only seems to happen if you in addition specify -p fixcase
Original comment by r...@raybooysen.com
on 19 Jul 2012 at 1:38
See fix for 167
Original comment by mAbushar...@hotmail.com
on 12 Jun 2013 at 2:54
You can make it actual create PascalCase if you modify the common.xslt
toPascalCase template as below. Creating the val intermediate to detect the all
uppercase scenario. Requires the fix described in 167 to work properly as well.
<xsl:template name="toPascalCase">
<xsl:param name="value"/>
<xsl:param name="delimiter" select="'_'"/>
<xsl:param name="keepDelimiter" select="false()"/>
<xsl:if test="$value != ''">
<xsl:variable name="val">
<xsl:choose>
<xsl:when test="$value=translate($value,$alpha,$ALPHA)">
<xsl:value-of select="translate($value,$ALPHA,$alpha)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="segment" select="substring-before($val, $delimiter)"/>
<xsl:choose>
<xsl:when test="$segment != ''">
<xsl:value-of select="translate(substring($segment,1,1),$alpha,$ALPHA)"/><xsl:value-of select="substring($segment,2)"/><xsl:if test="$keepDelimiter"><xsl:value-of select="$delimiter"/></xsl:if>
<xsl:call-template name="toPascalCase">
<xsl:with-param name="value" select="substring-after($val, $delimiter)"/>
<xsl:with-param name="delimiter" select="$delimiter"/>
<xsl:with-param name="keepDelimiter" select="$keepDelimiter"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate(substring($val,1,1),$alpha,$ALPHA)"/><xsl:value-of select="substring($val,2)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
Original comment by Park.Ves...@gmail.com
on 5 Sep 2013 at 6:18
Original issue reported on code.google.com by
pvginkel
on 20 Nov 2010 at 2:06