I am writing a site for online surveys. I have a list of questions that all go on one html page and the list is of unknown length. Each question has the form stored in template qu1.tpl and the page is qu.tpl.  Now I want to:
replace some names in
qu1.tplfor each questionreplace some things in
qu.tplonceand stick all instantiations of
qu1.tplintoqu.tpl
Using what I learned in the tutorial, I tried to recursively replace a tag <qulist/> with <apply template="qu1.tpl"><qulist/> in qu.tpl using localHeist and bindString but this cannot work because qu.tpl is already rendered so the newly inserted apply tag doesn't resolve.
what should I do instead?
(I guess this is a more general question. If you can think of other applications the answer applies to, please add text and tags for the search engines.)