[Zope-dev] Help with DTML-IN statement
Gary Yee
gyee@ads-specialists.com
Wed, 13 Mar 2002 11:13:22 -0800
This is a multi-part message in MIME format.
------=_NextPart_000_0362_01C1CA80.168F28B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I am very new to Zope/DTML and I am a little confused with the operation =
of the DTML-IN statement. Here is the snippet of code
=20
<table border=3D1 width=3D100%>
<dtml-in expr=3D"( ((1), (1,2),(4,5,6),(7,8,9)) )">
<tr>
<td><dtml-var sequence-item></td>=20
</tr>
</dtml-in>
</table>
=20
This code displays the contents 4 cells in a table and the output is
1
2
(4,5,6)
(7,8,9)
I am a litte confused because I thought it would display the contents of =
the list as
(1)
(1,2)
(4,5,6)
(7,8,9)
I believe this is related to something I read about tuples of ( key, =
value) will handled with sequence-key and sequence-item ???? I must be =
traversing the list incorrectly.....can anyone give me an example of how =
to traverse this list of tuples correctly.=20
Any help would be greatly appreciated.....thank you very much in advance
Gary
------=_NextPart_000_0362_01C1CA80.168F28B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>I am very new to Zope/DTML and I am a little confused with the =
operation of=20
the DTML-IN statement. Here is the snippet of code</DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><table border=3D1 =
width=3D100%><BR><dtml-in=20
expr=3D"( ((1), (1,2),(4,5,6),(7,8,9)) =
)"><BR> =20
<tr><BR>  =
; =20
<td><dtml-var sequence-item></td>=20
<BR> =20
</tr><BR></dtml-in><BR></table><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This code displays the contents 4 cells =
in a table=20
and the output is<BR>1<BR>2<BR>(4,5,6)<BR>(7,8,9)<BR><BR>I am a litte =
confused=20
because I thought it would display the contents of the list=20
as<BR>(1)<BR>(1,2)<BR>(4,5,6)<BR>(7,8,9)<BR><BR>I believe this is =
related to=20
something I read about tuples of ( key, value) will handled with =
sequence-key=20
and sequence-item ???? I must be traversing the list incorrectly.....can =
anyone=20
give me an example of how to traverse this list of tuples correctly.=20
</FONT></DIV>
<DIV> </DIV>
<DIV>Any help would be greatly appreciated.....thank you very much in=20
advance</DIV>
<DIV> </DIV>
<DIV>Gary</DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_0362_01C1CA80.168F28B0--