Use Saxon6 to process the element. 
        If the XSLT has a filename (fn), use that. Otherwise, make temp.

def saxon6(self, elem, **params):
        """Use Saxon6 to process the element. 
        If the XSLT has a filename (fn), use that. Otherwise, make temp.
        """
        java = os.environ.get('java') or 'java'
        saxon6path = os.path.join(JARS, 'saxon.jar')   # saxon 6.5.5, included with jing and trang
        with tempfile.TemporaryDirectory() as tempdir:
            if self.fn is None:
                xslfn = os.path.join(tempdir, "xslt.xsl")
                self.write(fn=xslfn)
            else:
                xslfn = self.fn
            srcfn = os.path.join(tempdir, "src.xml")
            outfn = os.path.join(tempdir, "out.xml")
            XML(fn=srcfn, root=elem).write()
            cmd = [java, '-jar', saxon6path, '-o', outfn, srcfn, xslfn] \
                + ["%s=%r" % (key, params[key]) for key in params.keys()]
            log.debug("saxon6: %r " % cmd)

            try:
                subprocess.check_output(cmd)
            except subprocess.CalledProcessError as e:
                error = html.unescape(str(e.output, 'UTF-8'))
                raise RuntimeError(error).with_traceback(sys.exc_info()[2]) from None

            if self.find(self.root, "xsl:output") is None or self.find(self.root, "xsl:output").get('method')=='xml':
                return etree.parse(outfn)
            else:
                return open(outfn, 'rb').read().decode('utf-8')