Hi.
I am currently hacking the DTMLTeX product, (maybe gonna make a relase of it ...) which seems unmaintained, as the old owner isn't responding anymore.
What i needed for that, was a new modifier for dtml-var, called "tex_quote", that I implemented by "monkeypatching" DT_Var.Var .
My question now: Would it be possible to modify the DT_Var.Var.__init__, so it can call the parse_params in a way, that I only have to path the DT_Var.modifiers? I think that wouldn't be a big change, but i wouldn't need to monkeypatch the __init__ ...
I am willing to provide the changed code for that, if this gets accepted.
Greetings
Christian
If I understand what you are asking, this is something I need as well. I am trying to create an entity_encode and entity_decode modifier (Like the html encode and html decode modifiers) that will encode (decode) all characters in the string that are special or illegal in XML.
If there is an easy (Or even not so easy) way of adding this without a nasty patch (i.e. replacing an entire method in DT_Var) I would love to hear about it. If there isn't I would like to propose that this be changed (i.e. added).
Adrian...
-- Adrian Hungate EMail: adrian@haqa.co.uk Web: http://www.haqa.co.uk
----- Original Message ----- From: "Christian Theune" ct@gocept.com To: zope-dev@zope.org Sent: Wednesday, May 29, 2002 2:56 PM Subject: [Zope-dev] DT_Var modifier
Hi.
I am currently hacking the DTMLTeX product, (maybe gonna make a relase of
it ...) which
seems unmaintained, as the old owner isn't responding anymore.
What i needed for that, was a new modifier for dtml-var, called
"tex_quote", that I implemented
by "monkeypatching" DT_Var.Var .
My question now: Would it be possible to modify the DT_Var.Var.__init__,
so it can call
the parse_params in a way, that I only have to path the DT_Var.modifiers?
I think that wouldn't be
a big change, but i wouldn't need to monkeypatch the __init__ ...
I am willing to provide the changed code for that, if this gets accepted.
Greetings
Christian
-- Christian Theune - ct@gocept.com gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981
reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])
Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Hi. * Adrian Hungate adrian@haqa.co.uk [020529 18:20]:
If I understand what you are asking, this is something I need as well. I am trying to create an entity_encode and entity_decode modifier (Like the html encode and html decode modifiers) that will encode (decode) all characters in the string that are special or illegal in XML.
If there is an easy (Or even not so easy) way of adding this without a nasty patch (i.e. replacing an entire method in DT_Var) I would love to hear about it. If there isn't I would like to propose that this be changed (i.e. added).
Ok. There already is something like a small registry (it's only a list) where you need to add your filter function, but the __init__ patch is bad.
If someone would tell me to go on, I would start a small refactoring of this to allow that become more easy to introduce new filters ...
Regards
Christian