[Zope] Parsed XML Problem (we may need the best minds to solve this one :-)
Andrew Kenneth Milton
akm@theinternet.com.au
Tue, 25 Sep 2001 23:43:12 +1000
+-------[ Oleg Broytmann ]----------------------
| 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:
He's not calling a DTML Object, he's calling an external method.
Perhaps before being so terse, you should read the whole question,
the relevant part of which is ironically still in the reply.
| <dtml-var "db2onehtml(_.None, _, test_xml=_.getitem('test.xml', 1))">
Actually he's calling .id() on the ParsedXML Object, and id is a string
(but a function on File Objects, which is why it works on those)
I've told him to use .getId(). He has other problems now, for which he
will have to read some doco.
--
Totally Holistic Enterprises Internet| | Andrew Milton
The Internet (Aust) Pty Ltd | |
ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|