[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Getting values from different templates


Subject: Re: [xsl] Getting values from different templates
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 10 Jan 2006 09:50:02 +0000

On 1/10/06, T Uma Shankari <umashankari@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>
> Greetings!
>
>    I have 3 different values stored in different variablenames in
> 3 different templates. I am trying to display the 3 values in one template
by passing
> the variable values as parameter to common template. For example
> stringfirst,stringmid,stringend variables from different templates to
> finalstring template like this
>
> <xsl:template name="finalstring">
>    <xsl:param name="stringfirst"/>
>    <xsl:param name="stringmid"/>
>    <xsl:param name="stringend"/>
>    <xsl:value-of select="$stringfirst"/>
>    <xsl:value-of select="$stringmid"/>
>    <xsl:value-of select="$stringend"/>
>   </xsl:template>
>
>
> But while executing  i can get only the third variable value. Please correct
me where i am doing wrong.

You've probably got a typo in the place where finalstring is called,
but you haven't posted that bit of code.  Even then, this is a pretty
pointless template - what are you trying to achieve?  Wherever you
call finalstring, you could just use value-of instead.


Current Thread