<div dir="ltr"><br><br><div class="gmail_quote">2008/10/14 Wichert Akkerman <span dir="ltr">&lt;<a href="mailto:wichert@wiggy.net">wichert@wiggy.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Previously Binseer N wrote:<br>
&gt; Hi all,<br>
&gt; Can anybody tell me how can i add resource by using <a href="http://z3c.pt" target="_blank">z3c.pt</a>. i know how to<br>
&gt; add it by using zope.pagetemplate, i tried it and it was working well. The<br>
&gt; following is the code i am working with and it was not working with <a href="http://z3c.pt" target="_blank">z3c.pt</a><br>
&gt;<br>
&gt;<br>
&gt; *configure.zcml:-<br>
&gt;<br>
&gt; .<br>
&gt; .<br>
&gt; *&lt;adapter<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; factory=&quot;.resizing_font.form_template&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; for=&quot;.resizing_font.ResizingFont&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; name=&quot;tatr_css_js.form&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; /&gt; &nbsp; *<br>
&gt;<br>
&gt; &nbsp;*&lt;browser:resourceDirectory<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;name=&quot;tatr_js&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;directory=&quot;tatr_resource_js&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;/&gt; &nbsp;*<br>
&gt;<br>
&gt; .<br>
&gt; .<br>
&gt; .<br>
&gt;<br>
&gt;<br>
&gt; <a href="http://resizing_font.pt" target="_blank">resizing_font.pt</a> :-<br>
&gt;<br>
&gt; *&lt;html&gt;*<br>
&gt; * &nbsp; &nbsp; &lt;head&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.2.6.js&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; tal:attributes=&quot;src<br>
&gt; context/++resource++tatr_js/jquery-1.2.6.js&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/script&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;/head&gt;<br>
&gt; &nbsp; &nbsp;&lt;body&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;This is a test :)<br>
&gt; &nbsp; &nbsp;&lt;/body&gt;<br>
&gt;<br>
</div>&gt; &lt;/html&gt;*<br>
<br>
Try adding a trailing ; after your TALES expression.<br>
<br>
Wichert.<br> </blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888"><br>&nbsp; <br>
--<br>
Wichert Akkerman &lt;<a href="mailto:wichert@wiggy.net">wichert@wiggy.net</a>&gt; &nbsp; &nbsp;It is simple to make things.<br>
<a href="http://www.wiggy.net/" target="_blank">http://www.wiggy.net/</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; It is hard to make things simple.</font></blockquote><div><br><br><br><br><br><br>Thank you&nbsp;&nbsp; for the reply&nbsp; Wichert.<br>
&nbsp; &nbsp; &nbsp;&nbsp; Do you mean i have to add &quot;;&quot; after the&nbsp; TAL expression&nbsp; . I tried so but the result is same .<br>
<br>
&nbsp;Initially i tried with the following code , but it fired the same error <br>
<br>
ie&nbsp; &lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.2.6.js&quot;&gt;<br>

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; tal:attributes=&quot;src&nbsp;
context/++resource++tatr_js/jquery-1.2.6.js;&quot;&gt;<br>
<br>
<br>
then i tried with the following <br>
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.2.6.js&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:attributes=&quot;src context++resource++tatr_jsjquery-1.2.6.js&quot;;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br>
&nbsp;&nbsp; &lt;/script&gt;&nbsp; <br>
<br>
it fired the error<br>
<br>
2008-10-14T11:45:52 ERROR SiteError <a href="http://192.168.0.43:8080/resizing_font.html">http://192.168.0.43:8080/resizing_font.html</a><br>
Traceback (most recent call last):<br>
&nbsp; File &quot;/home/z3.4/lib/python/zope/publisher/publish.py&quot;, line 133, in publish<br>
&nbsp;&nbsp;&nbsp; result = publication.callObject(request, obj)<br>
&nbsp; File &quot;/home/z3.4/lib/python/zope/app/publication/zopepublication.py&quot;, line 167, in callObject<br>
&nbsp;&nbsp;&nbsp; return mapply(ob, request.getPositionalArguments(), request)<br>
&nbsp; File &quot;/home/z3.4/lib/python/zope/publisher/publish.py&quot;, line 108, in mapply<br>
&nbsp;&nbsp;&nbsp; return debug_call(obj, args)<br>
&nbsp;&nbsp; - __traceback_info__: &lt;security proxied zope.app.publisher.browser.viewmeta.ResizingFont instance at 0x9913d6c&gt;<br>
&nbsp; File &quot;/home/z3.4/lib/python/zope/publisher/publish.py&quot;, line 114, in debug_call<br>
&nbsp;&nbsp;&nbsp; return obj(*args)<br>
&nbsp; File &quot;/home/z3.4/lib/python/zope/formlib/form.py&quot;, line 774, in __call__<br>
&nbsp;&nbsp;&nbsp; return self.render()<br>
&nbsp; File &quot;/home/z3.4/lib/python/zope/formlib/form.py&quot;, line 768, in render<br>
&nbsp;&nbsp;&nbsp; self.form_result = self.template()<br>
&nbsp; File &quot;/home/z3.4/lib/python/z3c/pt/pagetemplate.py&quot;, line 40, in render<br>
&nbsp;&nbsp;&nbsp; return template.render(**parameters)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/zpt/template.py&quot;, line 51, in render<br>
&nbsp;&nbsp;&nbsp; return super(PageTemplateFile, self).render(**kwargs)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/template.py&quot;, line 156, in render<br>
&nbsp;&nbsp;&nbsp; return super(TemplateFile, self).render(**kwargs)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/template.py&quot;, line 62, in render<br>
&nbsp;&nbsp;&nbsp; template = self.cook_check(parameters=kwargs)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/template.py&quot;, line 152, in cook_check<br>
&nbsp;&nbsp;&nbsp; return Template.cook_check(self, **kwargs)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/template.py&quot;, line 57, in cook_check<br>
&nbsp;&nbsp;&nbsp; template = self.cook(parameters=parameters, **kwargs)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/template.py&quot;, line 138, in cook<br>
&nbsp;&nbsp;&nbsp; template = self.compiler(**kwargs)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/template.py&quot;, line 46, in compiler<br>
&nbsp;&nbsp;&nbsp; encoding=self.encoding)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/translation.py&quot;, line 517, in __init__<br>
&nbsp;&nbsp;&nbsp; self.root, parsed_doctype = parser.parse(body)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/zpt/language.py&quot;, line 250, in parse<br>
&nbsp;&nbsp;&nbsp; root, doctype = super(Parser, self).parse(body)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/etree.py&quot;, line 39, in parse<br>
&nbsp;&nbsp;&nbsp; return parse(body, self.element_mapping)<br>
&nbsp; File &quot;/home/z3.4/lib/python/chameleon/core/etree.py&quot;, line 202, in parse<br>
&nbsp;&nbsp;&nbsp; tree = lxml.etree.parse(StringIO(body), parser)<br>
&nbsp; File &quot;lxml.etree.pyx&quot;, line 2576, in lxml.etree.parse (src/lxml/lxml.etree.c:22796)<br>
&nbsp; File &quot;parser.pxi&quot;, line 1483, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:60359)<br>
&nbsp; File &quot;parser.pxi&quot;, line 1511, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:60613)<br>
&nbsp; File &quot;parser.pxi&quot;, line 1390, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:59530)<br>
&nbsp; File &quot;parser.pxi&quot;, line 932, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:56815)<br>
&nbsp; File &quot;parser.pxi&quot;, line 538, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:53512)<br>
&nbsp; File &quot;parser.pxi&quot;, line 624, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:54372)<br>
&nbsp; File &quot;parser.pxi&quot;, line 564, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:53770)<br>
XMLSyntaxError: attributes construct error, line 12, column 16<br>
&nbsp;</div></div><br></div>