Mikael Petterson
Usenet Archive
- Joined
- Nov 3, 2002
- Messages
- 27
- Reaction score
- 0
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">
<xsl
aram name="str"/>
<xsl
aram 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">
<xsl
<xsl
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