Lee writes:
 > ...
 > I have a Python method expecting 'text' as a parameter ...
 > ...
 > The Python method, testSQL, returns 'result'.
 > ...
 > <dtml-in expr="REQUEST.form.items()">
 > <dtml-in expr="testSQL(text='<dtml-var sequence-key>x<dtml-var
 > sequence-item>')">
 > <dtml-var result>
 > </dtml-in></dtml-in>
Inside 'expr="..."' you use "_['x']" instead of <dtml-var x>.

As this is a Python expression that needs to be evaluated,
it cannot be in a string. You can use the "%" operator
which takes a format string and an object or tuple as
parameters and formats object/tuple according to the string.

If your Python method contains a "return result",
then there is not magically a "result" variable (and there is
not need for it, too).

Are you sure, you want the nested "dtml-in". Looks very strange.

Thus, you can use:

   <dtml-in expr="REQUEST.form.items()">
     <dtml-var expr="testSQL(text='%sx%s' % (_['sequence-key],_[' sequence-item]))">


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to