[ZPT] Re: [Roundup-users] why does tal not get interpretted inside <scr ipt> tags?

Marlon van den Berg marlon.vandenberg at tiscali.nl
Tue Sep 7 14:39:19 EDT 2004


On Tuesday, September 07, 2004 6:13 PM, Fred Drake wrote:
> On Tue, 07 Sep 2004 10:34:19 +0100, Chris Withers
> > This is a very good idea from my p.o.v.
> > What do other people think?
>
> There lies the path to insanity.  Lots of special rules cause lots of
> special code, which ends up difficult to maintain.  This is a bad
> thing.

Why special rules? In fact, the rules will become simpler. Just allow TAL
within all HTML tags with exception of the comment tags <!--...-->. Isn't
that the same aproach as TAL uses with XML?.
And why not? TAL allows to be used inside the <script....> tag itself. Isn't
this one valid too!:
    <script type="text/javascript" tal:content="self.document.title = 'Why
not?';" />
Isn't it so that the above also generates dynamic code within the CDATA
part?
So why not allow?:
    <script type="text/javascript">
        <tal:block tal:replace="self.document.title = 'Why not?';" />
    </script>
Sure, it would look insane if something like the next is used:
    <script type="text/javascript">
        <span tal:content="self.document.title = 'Why not?';" />
    </script>
but so it the next too. And that one is allowed by TAL.
    <title>
        <span tal:content="I rest my case!" />
    </title>

Regards,
Marlon



More information about the ZPT mailing list