[Zope] dtml-lesson learned... (DTML v ZPT)

Thomas B. Passin tpassin@mitretek.org
Wed, 21 Aug 2002 11:38:58 -0400


[Mike Renfro]

> On Wed, Aug 21, 2002 at 10:06:46AM +0800, Tim Hoffman wrote:
>
> > I find with pagetemplates that if you have large chunks of
> > Javascript, that need to be dynamically modified that pagetemplates
> > requirement to validate the page becomes a pain. You get situations
> > within Javascript where to get the page to compile, you have to do
> > really ugly hacks, which quickly become even more unreadable than
> > dtml
>
> Out of curiosity, is this pain at all reduced if you put the
> Javascript in some other page and refer to it from your templates? Or
> is Javascript not similar enough to valid xml in general?
>

Can you use CDATA sections in page templates (I would think you should be
able to)?  If so, those large chunks of javascript can mostly go into CDATA
sections.  This is a common approach to including javascript in xslt
templates.

Cheers,

Tom P