[Zope] <dtml-elif> problem

Tom Germaine tgermaine@upei.ca
Fri, 02 Aug 2002 13:28:45 -0300


Hi All:

I am trying to download files (with standardized filenames) to 
specific subdirectories with a form that calls a dtml document for 
processing, but the code breaks at the dtml-elif phrase:
--------
<dtml-var standard_html_header>

<h2><dtml-var title></h2>

<dtml-let fname="_.string.split(myfile.filename,'\\')[-1]">
<dtml-let filename="_.string.split(fname,'.html')[0]">

<dtml-if expr="filename[3:6]=='do_'"><dtml-let dir="do_">
<dtml-elif expr="filename[3:6]=='aa_'"><dtml-let dir="aa_">
<dtml-else><dtml-let dir="vth">

<dtml-with avc>
<dtml-call
  expr="dir.manage_addDTMLDocument(filename,mytitle)">
</dtml-with>

</dtml-let>
</dtml-if>

</dtml-let>
</dtml-let>

<dtml-var showFiles>
<dtml-var standard_html_footer>
-------
with error message: 
Unexpected tag, for tag <dtml-elif expr="filename[3:6]=='aa_'">

However, the code function ok if dtml-elif and dtml-else lines are 
omitted. 

I cannot understand why and would appreciate any solutions.

Tom Germaine

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Tom Germaine
System Administrator
UPEI Access Services
tgermaine@upei.ca
566-0465
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~