@errors.callback
    def filter(self, result):
        try:
            input = etree.fromstring(result)
        except etree.XMLSyntaxError, ex:
            raise errors.TestCritical("Invalid XML: %s" % ex)

        try:
            output = self.xslt(input)
        except etree.XSLTApplyError, ex:
            raise errors.TestCritical("XSLT transform failed: %s" % ex)

        return etree.tostring(output, pretty_print=True)
dataset/ETHPy150Open marineam/nagcat/python/nagcat/plugins/filter_xml.py/XSLTFilter.filter/original