In this developerWorks DataPower forum posting Rohit raised the interesting question stated in the title:
It is possible:
Find the nice solution with comments in below stylesheet, you may download from here:
Be aware of the price to pay, this method will overflow the stylesheet cache easily (default setting is 256 stylesheets).
So please use a seperate XML manager for this kind of transformations.