Added Delete command
[sfa.git] / sfatables / xmlrule.py
index 381b587..b0f6fde 100644 (file)
@@ -1,4 +1,5 @@
 import libxml2
+import libxslt
 from sfatables.globals import *
 
 class XMLRule:
@@ -12,12 +13,17 @@ 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()