[Zope-dev] DT_Var modifier

2002-05-29 Thread Christian Theune

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 - [EMAIL PROTECTED]
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  -  [EMAIL PROTECTED]
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 )



Re: [Zope-dev] DT_Var modifier

2002-05-29 Thread Christian Theune

Hi. 
* Adrian Hungate [EMAIL PROTECTED] [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

-- 
Christian Theune - [EMAIL PROTECTED]
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  -  [EMAIL PROTECTED]
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 )