Separate out HTML generation from dialect and rewrite with PARSE