I have a question: why do you think a generic text transformation would correctly apply to a formatted text?
It is more than likely it would break the formatting. Which you, evidently, proved yourself.
If you want to compress the XML, use XML tools.

I have a question: why do you think a generic text transformation would correctly apply to a formatted text?
It is more than likely it would break the formatting. Which you, evidently, proved yourself.
If you want to compress the XML, use XML tools.

I had assumed that Smarty was designed to work with HTML. Sorry, my bad.