[Zope] Strange 'with' behavior? (Q1959)

Martijn Pieters mj@antraciet.nl
Wed, 15 Sep 1999 13:23:04 +0200


At 12:47 15/09/99 , picasso@videotron.ca wrote:
>Hi,
>
>I made another stupid test with strange results:
>in '/myCDs/' I wrote a DTML Method called 'test':
>
><dtml-with 0001>
></dtml-with>
>
>0001 is a ZClass object in myCDs.
>
>When I click on the tab view, I was asked to download the file 'test'. I
>did it. The downloaded file is empty.
>
>Sure the test is not very useful, but I try to undestand better how Zope
>works.
>
>Does anyone, can explain the result of my 'test'.
>
>Thanks.

The with tag puts the 0001 object on top of the namespace. Next thing, you 
don't do anything with that namespace, so no actual output is produced.

Zope checks your output for HTML tags (specifically, for the <HTML> tag), 
and as it can't find that, it tries to adjust the MIME-type accordingly. 
That's what makes your browser prompt you to save the file.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------