One question: can your solution deal with node sets as output (rather than xml) so to re-transform the input again?
If so, are you then using the parser to take the recursive hit (e.g stack space on a looping xml call-template) or the middle ware of yours? How are inline errors from the xsl handled etc....