[Zope] Proposal: Include tino's patched <dtml-in> in future Z ope

Tino Wildenhain tino@wildenhain.de
Tue, 27 Feb 2001 12:12:06 +0100


Hi again :-)

--On Dienstag, 27. Februar 2001 09:57 +0000 Toby Dickenson 
<tdickenson@geminidataloggers.com> wrote:

>> > a. If an object which is an element of the inner sequence has an
>> > attribute outer_item.
>>
>> sure. The responsible programmer then has to use another
>> prefix. Obviously.
>
> Lets put it in a context... suppose the example dtml was part of a search
> results page on www.zope.org. The element of the sequence might be one of
> my HOWTOs.

Ok, and then?

>
> I am free to add any property to my HOWTOs. Therefore I can break the dtml
> if I know what prefix it is using, by adding a property with the
> appropriate name.

What if one chooses "sequence-item" just for the sake of example? ;)

> Everything is fine if you are happy with level of robustness, but please
> remind me never to trust important data to your application.

I cant see it. Really. If you have generic column names, you have to find
a way to get the coulmn names. It may be sequence_item.keys() or whatever.
The same mechanism is used to get the value of that columns then:
sequence_item[key]

If you know while writing the code what attributes you want - why schould 
you
choose a prefix that interferes with your names? Why should you choose a
specific prefix at all if you dont put loops into another? Note it still 
remains
"sequence" until specified.

Regards
Tino :-)

PS: ok, we could encapsulate all the sequence stuff into an extra object 
with subobjects.
But this would make it a bit harder for DTML-Users (I mean sequence.item 
instead of sequence_item)