Use xml parser in post_tidy stage.

Also avoid an unnecessary reparse by changing the code to pass the
new tree straight to the xsl transform stage.