M
Mikael Petterson
Hi,
Question 1:
When I call the template from within the template will the params
str and u-str values be overridden? That is
str equal to select="substring($str,2)" and
u-str equal to select="substring($u-str,2)"
---------------------------------------------------
<xsl:template name="Camel2Underscore">
<xslaram name="str"/>
<xslaram name="u-str"
select="translate($str,$ucase,'||||||||||||||||||||||||||')"/>
<xsl:choose>
<xsl:when test="substring($u-str,1,1) = '|'">
<xsl:text>_</xsl:text>
<xsl:value-of select="substring($str,1,1)"/>
<xsl:call-template name="Camel2Underscore">
<xsl:with-param name="str" select="substring($str,2)"/>
<xsl:with-param name="u-str" select="substring($u-str,2)"/>
</xsl:call-template>
..............
</xsl:template>
Question 2:
substring($str,2) is this the same as substring starting at 2 and the rest?
I appreciate this forum very much
//Mikael
Question 1:
When I call the template from within the template will the params
str and u-str values be overridden? That is
str equal to select="substring($str,2)" and
u-str equal to select="substring($u-str,2)"
---------------------------------------------------
<xsl:template name="Camel2Underscore">
<xslaram name="str"/>
<xslaram name="u-str"
select="translate($str,$ucase,'||||||||||||||||||||||||||')"/>
<xsl:choose>
<xsl:when test="substring($u-str,1,1) = '|'">
<xsl:text>_</xsl:text>
<xsl:value-of select="substring($str,1,1)"/>
<xsl:call-template name="Camel2Underscore">
<xsl:with-param name="str" select="substring($str,2)"/>
<xsl:with-param name="u-str" select="substring($u-str,2)"/>
</xsl:call-template>
..............
</xsl:template>
Question 2:
substring($str,2) is this the same as substring starting at 2 and the rest?
I appreciate this forum very much
//Mikael