summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-04-03 22:09:34 +0200
committerJan Pokorný <jpokorny@redhat.com>2014-04-03 22:11:09 +0200
commit060287dde8e4bd303908cd2f8a67060d900659bd (patch)
tree8bf3460b74c4d66b74cded1dfcc83f52785929a0
parent118c2864434dec92265fafe2c048cb3fa7ad5a0f (diff)
downloadclufter-060287dde8e4bd303908cd2f8a67060d900659bd.tar.gz
clufter-060287dde8e4bd303908cd2f8a67060d900659bd.tar.xz
clufter-060287dde8e4bd303908cd2f8a67060d900659bd.zip
filter(s): proceed_xslt -> proceed_xslt_filter + related cleanup
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--filter.py5
-rw-r--r--filters/ccs2ccs_pcmk.py3
-rw-r--r--filters/ccs2coro.py6
3 files changed, 8 insertions, 6 deletions
diff --git a/filter.py b/filter.py
index 2903663..0e2e062 100644
--- a/filter.py
+++ b/filter.py
@@ -282,7 +282,10 @@ class XMLFilter(Filter, MetaPlugin):
@classmethod
def proceed_xslt(cls, in_obj, **kwargs):
- """Apply iteratively XSLT snippets as per the schema tree (walk)"""
+ """Apply iteratively XSLT snippets as per the schema tree (walk)
+
+ You should likely use `proceed_xslt_filter` wrapper instead.
+ """
# XXX postprocess: omitted as standard defines the only root element
def proceed(transformer, elem, children):
diff --git a/filters/ccs2ccs_pcmk.py b/filters/ccs2ccs_pcmk.py
index a55b793..b745367 100644
--- a/filters/ccs2ccs_pcmk.py
+++ b/filters/ccs2ccs_pcmk.py
@@ -6,9 +6,8 @@
__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
from clufter.filter import XMLFilter
-#from lxml import etree
@XMLFilter.deco('ccs', 'ccs')
def ccs2ccs_pcmk(flt_ctxt, in_obj):
- return ('etree', flt_ctxt.proceed_xslt(in_obj))
+ return ('etree', flt_ctxt.proceed_xslt_filter(in_obj))
diff --git a/filters/ccs2coro.py b/filters/ccs2coro.py
index 6389819..9953593 100644
--- a/filters/ccs2coro.py
+++ b/filters/ccs2coro.py
@@ -6,17 +6,17 @@
__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
from clufter.filter import XMLFilter
-#from lxml import etree
def _ccs2coroxml(flt_ctxt, in_obj):
- #print etree.tostring(in_obj('etree').xslt(flt.get_template(in_obj)))
- return ('etree', flt_ctxt.proceed_xslt(in_obj))
+ return ('etree', flt_ctxt.proceed_xslt_filter(in_obj))
+
@XMLFilter.deco('ccs', 'coroxml')
def ccs2flatironxml(flt_ctxt, in_obj):
return _ccs2coroxml(flt_ctxt, in_obj)
+
@XMLFilter.deco('ccs', 'coroxml')
def ccs2needlexml(flt_ctxt, in_obj):
return _ccs2coroxml(flt_ctxt, in_obj)