Questions about elements and functions in xsl

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:param name="str"/>
<xsl:param 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top