0

I am stuck up in an odd situation I have an variable named PaymentabcflowsVar as shown below

<xsl:with-param name="PaymentabcflowsVar" select="$RBC_CDSERStream_Obj/CTM_PaymentPeriod"/>

and I am fetching the value at some logic as shown below..

<xsl:value-of select="$TTeturnVar/onal/onalAmount/amount" />

now I want to assign this value to the above variable named PaymentabcflowsVar such as

PaymentabcflowsVar  = <xsl:value-of select="$TTeturnVar/onal/onalAmount/amount" />

please advise how to achieve this..!!

well now what I have done is that i have assign the value a variable temporarily

<xsl:variable name="holodingtnalamount"><xsl:value-of select="$TTeturnVar/onal/onalAmount/amount" /> 

now please advise can I assign the variable holodingtnalamount value to PaymentabcflowsVar

sonum kumar
  • 183
  • 1
  • 1
  • 10
  • Regarding your update per my answer: (1) Assigning to a temporary variable is not the way to work around the single-assignment requirement; you have to test against the input document directly instead. (2) Your added `holodingtnalamount` syntax is wrong. (3) I asked below for more context; you've not provided it. We can't help you more specifically without more context. (4) If you've received value from the answers you've received to the 10 questions you've asked, you should [**accept**](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) more than 1/10 times. – kjhughes Oct 26 '13 at 04:39
  • Please describe your problem. You are trying to solve it the wrong way, but in order to tell you what you should be doing instead, we need to know what you are trying to achieve, not your incorrect solution. – Michael Kay Oct 26 '13 at 08:08

1 Answers1

1

A few matters of apparent confusion require clarification:

(1) Here's how to assign the value to a variable:

<xsl:variable name="PaymentabcflowsVar" 
              select="$TTeturnVar/onal/onalAmount/amount"/>

(2) A variable can only be assigned a value once. Explanation here.

(3) xsl:with-param is for use in passing parameters to named templates.

Community
  • 1
  • 1
kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • then is there any way as I need to assign the value at certain condition becomes true – sonum kumar Oct 26 '13 at 04:19
  • @sonumkumar No, there's no way to reassign a variable in XSLT. [**See explanation here.**](http://stackoverflow.com/a/19255959/290085). If you want to update your problem to include more context, we can probably suggest a complete solution for you. – kjhughes Oct 26 '13 at 04:23