Questions about elements and functions in xsl

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">
<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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top