[Zope] Patch to avoid hypenation variables and more

Tino Wildenhain tino@wildenhain.de
Mon, 04 Dec 2000 07:07:08 +0100


This is a multi-part message in MIME format.
--------------5983410EB9A1B4333560CCCD
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi there,

finally I want to release my patch for the in-tag. I hope
it finds its way into the source-tree.
I was sick writing such ugly constructs as _[_['sequence-item']]
and so on, so I patched DT_In.py and DT_InSV.py 
(in lib/python/DocumentTemplate) to use sequence_item as well.
All hypenation variables have now a second representation with
underscores instead of hypenation. I hope, some time we can
drop these hypenation variables.

The second problem is if you put one in-tag into another.
You have to use <dtml-let> oder REQUEST.set() with variables
of the outher in-tag to be able to reference them in the inner
loop. The code becomes very ugly this way. So my idea was to
give the in-tag an optional argument, called "prefix" to 
prefix all the sequence-variables with a custom identifier.
So you can write:

<dtml-in some_sequence prefix="outer_">
   <dtml-in some_other_sequence>
     <dtml-var outer_sequence_item>:<dtml-var sequence_item>
   </dtml-in the inner sequence>
</dtml-in the outer sequence>

What do you think about this? 

Attached are the patch files (g-zipped) They are a bit
of size, but I choosed to send them as diff, as requested to
avoid flames ;) (Althought the original files would be similar 
in size) If someone wants the whole files, feel free to write
to me)

Regards
Tino
--------------5983410EB9A1B4333560CCCD
Content-Type: application/x-gzip;
 name="DT_In.py.diff.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="DT_In.py.diff.gz"

H4sICDBbKzoAA0RUX0luLnB5LmRpZmYA7Rxrb+M28vMV6H/gZYHKgWXHcp4O6nQXaA+3QFsU
3W37YREYsk0nbGRJleQk3l9/M3yJokVZSryHO6DEIpIlznDeM3xoB4MBOSnW6ckdXbJiMLk8
nwSTq9PxIDgbB6NB8I+fkph8TxeEnJHR5Pp8dH06JuPRaPRVv99vghy7Id++JYOrsX9B+vB3
Qt6+/Yq8IWFRZGy+KVgS5yTMKIlYXtAlYTEp7ikJF4tknYbxlsV3ZJHhkDlZsYgOv0Zo/HPQ
9vVXffj3hvwSFot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fr5pBHoXVUlwiVfc13XAtXMz/WAz2Ht/RXuSMAf9TwbmuNUTm2v5AlZKN
Om+NpwbkF3kXlyKQX44OG8j1TvchYrlGdohwHhwklAd/h/H/yzAu/uOGS30Qx4HkEJHcNasq
jWj04gg+OmD0tpszdEPn/wB4fVleKVQAAA==
--------------5983410EB9A1B4333560CCCD
Content-Type: application/x-gzip;
 name="DT_InSV.py.diff.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="DT_InSV.py.diff.gz"

H4sICHVbKzoAA0RUX0luU1YucHkuZGlmZgDtWFtv2zYUfl6A/AeiSSC5kmxLdm7C1OWhfSiG
FcNabA+BITA23QiTKUekPXv78zskJUukKCdZ91g9mBb1ndvHw8NLEARoxFfr0VeyyHhwe315
G97eXkZBOI3CcRD+8EtB0XsyR2iKxrfxZRRPIhSNx+MTz/OOSUb9knd3KLiZ+lfIg99rdHd3
gs7+1+f0BKXpopinaeI4zmfytCF0TtAWlxl+yAlDbLNeFyUH3OmJd4Z+xXz+CN28QHhbZAv0
uF8TinlW0GBbyzzs0ZeMFuiPLF8Q+ogzKqMZhdFoPJGa0PnHRYzef0k/0s+/D9d7f4vCYXit
YONLQKLwJp5cxZNbxBnBW1KiD7s1OgcnpcvQwcCmcPv8N7LNxEusdJw792EYB9HsVNIXjq8E
f+H42g/HksH6YSRfDhnHJU8pXpG0JIn2pjzV0AvMcSJ//gE6UOtx1iW4UWxYyioSnRiNfRNF
yY4fR9QfU+kLQMJ+CKGLSgfSALUvgWFJRwlfjiPqj0HbF0FqFF764QR5UTT2w6nGqv0BPeUe
Qioz+vU+93JC3e0gCOPZwLDZBibOT46nSYJAC09yRuKOxOlJ0Bmz+yYUCXdmSVusRbBFJK1F
Xq7u4GJJ+KakqOdrk2FAMM8Yz+Yy+VjitlAOLzjOHR8582JDufizyqhs8E42UFaw6iCibcvK
mSzG12/+B4BxwCJd4HIRLCBX5AQWkG5vIBV6HYVpW0lqVdL0prpXgybwBVk2wTNXUOwLCvw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