The doctype caused errors in the parsing of the html,
as it apears inside the template.
Adjusted this and pretty printed the string for readability
def xslt(self, transform):
"""XSLT transform"""
- return etree.tostring(transform(self._doc))
+ transformed = transform(self._doc)
+ transformed_str = etree.tostring(transformed.getroot(),
+ encoding="unicode",
+ method="xml", doctype=None,
+ pretty_print=True,
+ xml_declaration=False))
+ return transformed_str
def clean(self):
"""cleaning xml"""