add template to parsing fragments
parsing and serializing template in XHTML