On 08.08.2007, at 00:39, Luis De la Parra wrote:


Hello all,

I just decided to give ExtJS a try, and while taking a look at
their "javascript templates", I think I found a bug in the template parsing
of zope:

trying to access a page that just serves the template below, fails with the
message:

========error msg===========
[...]zope.pagetemplate-3.4.0a1-py2.4.egg/zope/pagetemplate/ pagetemplate.py",
line 109, in pt_render
   - Warning: Compilation failed
- Warning: zope.tal.htmltalparser.NestingError: Open tags <html>, <body>,
<script> do not match close tag </div>, at line 12, column 35
PTRuntimeError: ['Compilation failed', 'zope.tal.htmltalparser.NestingError: Open tags <html>, <body>, <script> do not match close tag </div>, at line
12, column 35']
=============================

it seems like the parser sees the closing </div>, but misses the opening
one.
I tried commenting out <!-- --> the script contents, but got the same
problem. (If I comment the script tag as a whole, then the page gets
served, but that doesn't bring me anything =(  )

you can't put a <div> </div> inside your <script> tag...
the expression tal:attributes="src static/ext-base.js" makes no sense to me as well :)

i recommend reading http://plone.org/documentation/tutorial/zpt

cheers

jodok




======================== test.pt ===========================
<html>
        <head>
<script src="../static/ext-base.js" type="text/ javascript"
tal:attributes="src static/ext-base.js"></script>
<script src="../static/ext-all-debug.js" type="text/ javascript"
tal:attributes="src static/ext-all-debug.js"></script>
        </head>
        <body>
        ExtJS Test

        <div id="testid">this is a test</div>

        <script language="JavaScript">
             var tpl  = "<div> js-template </div>"
             var view = new Ext.JsonView("testid", tpl);
        </script>
</body>
</html>
============================================================

regards, luis


_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/batlogg.lists% 40lovelysystems.com


--
"Namespaces are one honking great idea -- let's do more of those!"
  -- The Zen of Python, by Tim Peters

Jodok Batlogg, Lovely Systems
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria
phone: +43 5572 908060, fax: +43 5572 908060-77


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to