[Zope] Surpress white space?

Jaroslav Lukesh lukesh at seznam.cz
Thu Aug 14 09:42:50 EDT 2003


> Odesílatel: Toby Dickenson <tdickenson at geminidataloggers.com>
> Komu: Sergey Volobuev <zope at phpv.khv.ru>; lsh at wo.cz
> Kopie: zoper at disturbance.dhs.org; Zope <zope at zope.org>
> Pøedmìt: Re: [Zope] Surpress white space?
> Datum: 9. èervence 2003 16:46
> 
> On Wednesday 09 July 2003 15:37, Sergey Volobuev wrote:
> 
> > But it is still ugly :((
> 
> Soon after I started using Zope, I created a <dtml-unitws> tag that
replaces 
> blocks of whitespace with a single character. The code looks a little
dated, 
> but is still functional. Examle usage below, followed by code. I hope
this 
> helps.
> 
> 
> <dtml-unitws>
>   <dtml-in xxx>
>     <dtml-if comecondition>
>       <dtml-var somevariable>
>     </dtml-if>
>   </dtml-in>
> </dtml-unitws>
> 

Sorry for late response. 

I was try to implement your code, but if I want to save document, I receive
error (see below). I use Zope 2.5.1 at Win32. But it makes error on that
DTML Document too:

<dtml-unitws>
                     <p>           spaces
                 </dtml-unitws>/spaces

I was put your code into Products/unitws/__init__.py file, restart Zope (a
"pyc" file was done).

Do you have some "hidden secrets" on unitws?

Many thanks, J. Lukesh


Error:

Document Template Parse Error</STRONG></P>
  
  unexpected end tag, for tag &lt;/dtml-unitws&gt;, on line 168 of
segment_pobyt_ikony<p>
<!--
Traceback (innermost last):
  File C:\Program
Files\zope-web\lukesh251\lib\python\ZPublisher\Publish.py, line 150, in
publish_module
  File C:\Program
Files\zope-web\lukesh251\lib\python\ZPublisher\Publish.py, line 114, in
publish
  File C:\Program Files\zope-web\lukesh251\lib\python\Zope\__init__.py,
line 159, in zpublisher_exception_hook
    (Object: segment_pobyt_ikony)
  File C:\Program
Files\zope-web\lukesh251\lib\python\ZPublisher\Publish.py, line 98, in
publish
  File C:\Program Files\zope-web\lukesh251\lib\python\ZPublisher\mapply.py,
line 88, in mapply
    (Object: manage_edit)
  File C:\Program
Files\zope-web\lukesh251\lib\python\ZPublisher\Publish.py, line 39, in
call_object
    (Object: manage_edit)
  File C:\Program Files\zope-web\lukesh251\lib\python\OFS\DTMLMethod.py,
line 254, in manage_edit
    (Object: segment_pobyt_ikony)
  File C:\Program
Files\zope-web\lukesh251\lib\python\DocumentTemplate\DT_String.py, line
320, in munge
    (Object: segment_pobyt_ikony)
  File C:\Program
Files\zope-web\lukesh251\lib\python\DocumentTemplate\DT_String.py, line
340, in cook
    (Object: segment_pobyt_ikony)
  File C:\Program
Files\zope-web\lukesh251\lib\python\DocumentTemplate\DT_String.py, line
170, in parse
    (Object: segment_pobyt_ikony)
  File C:\Program
Files\zope-web\lukesh251\lib\python\DocumentTemplate\DT_String.py, line
212, in parse_block
    (Object: segment_pobyt_ikony)
  File C:\Program
Files\zope-web\lukesh251\lib\python\DocumentTemplate\DT_String.py, line 58,
in parse_error
    (Object: segment_pobyt_ikony)
Document Template Parse Error: (see above)




More information about the Zope mailing list