[Zope] dtml-with in python script

Dieter Maurer dieter@handshake.de
Thu, 21 Jun 2001 21:28:40 +0200 (CEST)


DTML does not have assignment (okay, it has an ugly workaround in
"REQUEST.set"). Therefore, it needs "dtml-with" to open up namespaces.

Python script does not have "dtml-with" but it has assignment.

You have the following rough equivalence:

    <dtml-with XXXX>
      <dtml-var aaaa>
    </dtml-with>

is similar to:

    x= XXXX
    x.aaaa

i.e. assign the XXXX expression to a variable
and whenever you want to access any attribute of the
"XXXX", use the attribute of the variable.


Dieter