I believe that it is complaining that it expects to find a </dtml-let> before
the <dtml-elif>.
if you change the indenting like this:
<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>
notice that I haven't added anything but whitespace.
but say that the <dtml-if> resolves to 'TRUE', it enters the
<dtml-let> block
and the first tag is a <dtml-elif>. Thats the first thing that popped
into my head
anyhow, I've been wrong before =)>
Tom Germaine wrote:
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
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
-- Don't let rationalization stand in the way of your paranoia. Jason Bush | jason@nol.org Nebraska Online | http://www.nol.org