[Zope] dtml-var weirdness
Joseph A Knapka
jknapka@earthlink.net
Sat, 16 Feb 2002 11:28:58 +0000
Andreas Jung wrote:
>
> you mean <dtml-var xyz> or <dtml-var expr="_['xyz']"> ???
My understanding is that <dtml-var xyz> is exactly equivalent
to <dtml-var name="xyz">. In any case, the code fails in
exactly the same manner no matter which syntax is used.
Thanks,
-- Joe
> - aj
>
> ----- Original Message -----
> From: "Joseph A Knapka" <jknapka@earthlink.net>
> To: <zope@zope.org>
> Sent: Friday, February 15, 2002 20:44
> Subject: [Zope] dtml-var weirdness
>
> > Hi everyone,
> >
> > Stupid question of the day:
> >
> > Why might the following code result in a KeyError? It does
> > in some contexts under Zope 2.5.0.
> >
> > <dtml-if expr="REQUEST.has_key('xyz')">
> > <dtml-else>
> > <dtml-call expr="REQUEST.set('xyz','Hello world')">
> > </dtml-if>
> >
> > Sometimes the next line results in a KeyError, value 'xyz':
> >
> > <dtml-var name="xyz">
> >
> > In such cases, this works fine:
> >
> > <dtml-with REQUEST only>
> > <dtml-var name="xyz">
> > </dtml-with>
> >
> > Huh?
> >
> > TIA,
> >
> > -- Joe
> > "I should like to close this book by sticking out any part of my neck
> > which is not yet exposed, and making a few predictions about how the
> > problem of quantum gravity will in the end be solved."
> > --- Physicist Lee Smolin, "Three Roads to Quantum Gravity"
> >
> > _______________________________________________
> > Zope maillist - Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists -
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev )
> >
--
"I should like to close this book by sticking out any part of my neck
which is not yet exposed, and making a few predictions about how the
problem of quantum gravity will in the end be solved."
--- Physicist Lee Smolin, "Three Roads to Quantum Gravity"