code: def __build_lxml(target, source, env):
      
      from lxml import etree
      
      xslt_ac = etree.XSLTAccessControl(read_file=True, 
                                        write_file=True, 
                                        create_dir=True, 
                                        read_network=False, 
                                        write_network=False)
      xsl_style = env.subst('$DOCBOOK_XSL')
      xsl_tree = etree.parse(xsl_style)
      transform = etree.XSLT(xsl_tree, access_control=xslt_ac)
      doc = etree.parse(str(source[0]))
      # Support for additional parameters
      parampass = {}
      if parampass:
          result = transform(doc, **parampass)
      else:
          result = transform(doc)
          
      try:
          of = open(str(target[0]), "wb")
          of.write(of.write(etree.tostring(result, pretty_print=True)))
          of.close()
      except:
          pass
  
      return None
docs: General XSLT builder (HTML/FO), using the lxml module.