The actual XhtmlBaseSink writes XML elements without any formatting. It could be improved to include PrettyPrintXMLWriter.
This is the implementation of PrettyPrintXMLWriter for the XhtmlBaseSink. Some comments:
After some discussions with Lukas, we decided that pretty printing should be out of the core modules. I added a faq in r700752.
This is the implementation of PrettyPrintXMLWriter for the XhtmlBaseSink.
Some comments: