tags:

views:

23

answers:

2

Thank you for taking the time to look at my post.

I have an input tag that i need to have output-ed like so:

<input type="hidden" name="success_redirect" value="http://www.webpage.com?var1=${root/option1}&amp;amp;var2=${root/option2}" />

but i cant get that into my xslt document without it eventually rendering to

<input type="hidden" name="success_redirect" value="http://www.webpage.com?var1=$&amp;var2=$" />

What do i put in the XSLT to allow me to get that value tag to output like i need it to?

Thanks!

A: 

You can concatenate the parts:

<input type="hidden" name="success_redirect" 
  value="{concat('http://www.webpage.com?var1=${','root/option1}','&amp;amp;var2=${','root/option2}')}" />
Patrick
+4  A: 

Just use:

<input type="hidden" name="success_redirect"
 value="http://www.webpage.com?var1=${{root/option1}}&amp;amp;var2=${{root/option2}}" />

Do note that if we want to output a '{' or a '}' in an attribute, we have to double them.

This is because these two characters have special meaning when used inside an attribute: they indicate the start and end of an AVT (attribute-value-template).

Dimitre Novatchev
+1: Much better then my answer, thanks Dimitre.
Patrick
That was it- just doubling the brackets. Thanks!
Micah