<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Asad,<br>
You want to break out of a DTML loop but there is no loop breaking DTML
syntax. <br>
<br>
Here is another candidate DTML work-around:<br>
<br>
<dtml-in someSequence><br>
<dtml-if someCondition> <br>
whatever you do in the loop<br>
</dtml-if><br>
</dtml-in><br>
<br>
That way, you can avoid processing past a certain point, just that the
loop will run until the sequence reached the end. Of course if your
sequence is huge then this would be costly in terms of processing time
and then you should play the python card.<br>
<br>
David<br>
<br>
<br>
<br>
<br>
<br>
Jim Abramson wrote:
<blockquote
cite="midD17DB304A9F42B4787B68861F9DAE61C02158382@wgdc02.wgenhq.net"
type="cite">
<pre wrap="">Did you try <dtml-try> around the loop and <dtml-raise> inside of it?
Never done this myself, just a thought.
Jim
</pre>
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:zope-bounces@zope.org">zope-bounces@zope.org</a> [<a class="moz-txt-link-freetext" href="mailto:zope-bounces@zope.org">mailto:zope-bounces@zope.org</a>] On
Behalf Of J Cameron Cooper
Sent: Wednesday, June 15, 2005 1:37 PM
To: Asad Habib
Cc: <a class="moz-txt-link-abbreviated" href="mailto:zope@zope.org">zope@zope.org</a>
Subject: Re: [Zope] Exiting a Loop
Asad Habib wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Yes, I should not be doing this but I am using DTML not ZPT
</pre>
</blockquote>
<pre wrap="">and since
</pre>
<blockquote type="cite">
<pre wrap="">DTML provides programming functionality and in this case
</pre>
</blockquote>
<pre wrap="">the ability
</pre>
<blockquote type="cite">
<pre wrap="">to loop, there should be a way to exit a loop as well.
</pre>
</blockquote>
<pre wrap="">DTML is not a complete programming language; it simply provides some
(too-) familiar structures. You may try to treat it as such,
and can get away with it to a certain extent, but you may run
into limitations.
If you treat it as a templating engine (which it is) you will
find it complete.
                --jcc
--
"Building Websites with Plone"
<a class="moz-txt-link-freetext" href="http://plonebook.packtpub.com/">http://plonebook.packtpub.com/</a>
Enfold Systems, LLC
<a class="moz-txt-link-freetext" href="http://www.enfoldsystems.com">http://www.enfoldsystems.com</a>
_______________________________________________
Zope maillist - <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a>
** No cross posts or HTML encoding! **
(Related lists -
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
Zope maillist - <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a>
** No cross posts or HTML encoding! **
(Related lists -
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )
__________ NOD32 1.1141 (20050615) Information __________
This message was checked by NOD32 antivirus system.
<a class="moz-txt-link-freetext" href="http://www.nod32.com">http://www.nod32.com</a>
</pre>
</blockquote>
<br>
</body>
</html>