[Zope] Parsed XML Problem (we may need the best minds to solve this one :-)

Oleg Broytmann Oleg Broytmann <phd@phd.pp.ru>
Tue, 25 Sep 2001 17:36:05 +0400


On Wed, Sep 26, 2001 at 12:06:43AM +1200, Adam Warner wrote:
> > | I'm calling an external method with this DMTL:
> > | 
> > | <dtml-var "db2onehtml(_.getitem('test.xml'))">
> > 
> > <dtml-var "db2onehtml(_.getitem('test.xml', 1))">
> > 
> > Try this as a quick off-the-top-of-my-head-might-work solution
> 
> Doesn't work. Same error message [call of non-function (type string)]

   Would anyone of you be so kind and read some docs? To call a DTML object
you need to pass a client (may be None), a namespace (also may be None) and
a number (or zero number) of keyword parameters:

<dtml-var "db2onehtml(_.None, _, test_xml=_.getitem('test.xml', 1))">

   Inside db2onehtml the rendered test.xml will be available as string
in the variable test_xml.
   If you want object instead of rendered string, use getitem("...", 0).

Oleg.
---- 
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.