[Zope] DTML semantics changed 1.9 -> 1.10?
Ty Sarna
tsarna@endicor.com
27 Apr 1999 18:43:55 GMT
Noticed the following change in Zope's behavior. Imagine the following:
Folder, id 'test'
TinyTable, id 'data:
columns 'name', 'pos'
a single row of data, for simplicity:
"one", "first"
DTML Document or Method, id "show"
If show contains:
<!--#if data-->
<!--#in "data(name='one')"-->
<!--#var pos-->
<!--#/in-->
<!--#/if-->
Then Zope 1.10.2 is unable to find data's __call__. 1.9.0 worked fine.
The following variations, which should be equivalent in this case, all
work. Omitting the if works:
<!--#in "data(name='one')"-->
<!--#var pos-->
<!--#/in-->
Omitting the query and just using the whole dat TinyTable works:
<!--#if data-->
<!--#in data-->
<!--#var pos-->
<!--#/in-->
<!--#/if-->
Forcing acquisition of data works:
<!--#if data-->
<!--#in "test.data(name='one')"-->
<!--#var pos-->
<!--#/in-->
<!--#/if-->
It's as though within an #if, the name data is getting bound to some
other object (probably the results of data(), since it can be iterated
in the second working example above). Is this change in behavior intentional?