import libxml2
+import libxslt
from sfatables.globals import *
class XMLRule:
context = {'match':None,'target':None}
def apply_processor(self, type, rspec):
- processor = processors[type]
- styledoc = libxml2.parseFile(processor)
+ processor = self.processors[type]
+
+ # XXX TO CLEAN UP
+ filepath = 'processors/' + processor
+ # XXX
+
+ styledoc = libxml2.parseFile(filepath)
style = libxslt.parseStylesheetDoc(styledoc)
doc = libxml2.parseDoc(rspec)
result = style.applyStylesheet(doc, None)
- processed_result = style.saveResultToString(result, 0)
+ stylesheet_result = style.saveResultToString(result)
style.freeStylesheet()
doc.freeDoc()
result.freeDoc()