+ #doc.freeDoc()
+ #result.freeDoc()
+
+ return stylesheet_result
+
+ def wrap_up(self, doc):
+ filepath = os.path.join(sfatables_config, 'processors', self.final_processor)
+
+ if not os.path.exists(filepath):
+ # TODO: final_processor is not there yet
+ return doc#rspec
+
+ styledoc = libxml2.parseFile(filepath)
+ style = libxslt.parseStylesheetDoc(styledoc)
+ #doc = libxml2.parseDoc(rspec)
+ result = style.applyStylesheet(doc, None)
+ stylesheet_result = result #style.saveResultToString(result)
+ style.freeStylesheet()
+ #doc.freeDoc()
+ #result.freeDoc()