[ZPT] save changes linebreaks?

R. David Murray bitz@bitdance.com
Mon, 2 Apr 2001 10:02:42 -0400 (EDT)


On Wed, 28 Mar 2001, Guido van Rossum wrote:
> > joined onto the end of the previous line.  I'm formatting it the
> > way I want it to appear; is there some reason zpt can't save the
> > formatting as I write it?
> 
> The parsers don't pass on whitespace inside <...> constructs (nor a
> few other details, like which type of quotes was used and whether you
> wrote ">" or "&lt;").

Well, that's certainly a good reason why it can't <grin>.

> We were figuring that page templates are mostly useful for folks using
> tools like DreamWeaver, who rarely view the HTML and don't care much
> about how the HTML is formatted.

One of the things that really bothers me, as a programmer, about
DTML is the fact that it is impossible to format the combination
of HTML and DTML in a logical, "pretty" fashion.  I suspect you
can sympathise with this frustration, Guido <grin>.  So I'll probably
switch to pagetemplates if for no other reason than to be able to
rationally format my HTML/Zope source code.  I can live with the
formatting forced by the XML parser even though it produces ugly
bits in long lines, given that leading whitespace on tags gets
preserved correctly.

> you).  This is somewhat controversial; the reason why folks want this
> is that expanding the macros in the template gives a more realistic
> view of what it will look like -- again this is mostly for folks using
> DreamWeaver.

Yeah, it would actually be nice to have a switch that turned that
feature on and off, since as a programmer working with vi it just
gets in the way.  But for working with coworkers who are HTML
experts and not programmers, it looks to be a *very* nice feature.
Unfortunately I won't be in a position to test that in practice
for several months yet, since on my current project the HTML person
does *not* use a WYSYWIG tool and so I'm just exposing to her the
internal chunks of HTML.  Using page templates/macro expansion in
that context would, I think, just get in the way.

--RDM