Thank you yes that works but there still seems to be a couple of lines of whitespace left over I am hoping we can get rid of it altogether.
I tried sending the generated content to an ostream buffer then tidying it and then outputting it using the default ostream buffer.Any suggestions?
<iw_pt name="your-template-name"><iw_ostream filter = 's/\s*\n+/\n/g'><...></iw_ostream></iw_pt>