<div dir="ltr"><br><br><div class="gmail_quote">2008/10/14 Wichert Akkerman <span dir="ltr"><<a href="mailto:wichert@wiggy.net">wichert@wiggy.net</a>></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>
> Hi all,<br>
> 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>
> add it by using zope.pagetemplate, i tried it and it was working well. The<br>
> 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>
><br>
><br>
> *configure.zcml:-<br>
><br>
> .<br>
> .<br>
> *<adapter<br>
> factory=".resizing_font.form_template"<br>
> for=".resizing_font.ResizingFont"<br>
> name="tatr_css_js.form"<br>
> /> *<br>
><br>
> *<browser:resourceDirectory<br>
> name="tatr_js"<br>
> directory="tatr_resource_js"<br>
> /> *<br>
><br>
> .<br>
> .<br>
> .<br>
><br>
><br>
> <a href="http://resizing_font.pt" target="_blank">resizing_font.pt</a> :-<br>
><br>
> *<html>*<br>
> * <head><br>
> <script type="text/javascript" src="jquery-1.2.6.js"<br>
> tal:attributes="src<br>
> context/++resource++tatr_js/jquery-1.2.6.js"><br>
> </script><br>
> </head><br>
> <body><br>
> This is a test :)<br>
> </body><br>
><br>
</div>> </html>*<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> <br>
--<br>
Wichert Akkerman <<a href="mailto:wichert@wiggy.net">wichert@wiggy.net</a>> It is simple to make things.<br>
<a href="http://www.wiggy.net/" target="_blank">http://www.wiggy.net/</a> It is hard to make things simple.</font></blockquote><div><br><br><br><br><br><br>Thank you for the reply Wichert.<br>
Do you mean i have to add ";" after the TAL expression . I tried so but the result is same .<br>
<br>
Initially i tried with the following code , but it fired the same error <br>
<br>
ie <script type="text/javascript" src="jquery-1.2.6.js"><br>
tal:attributes="src
context/++resource++tatr_js/jquery-1.2.6.js;"><br>
<br>
<br>
then i tried with the following <br>
<script type="text/javascript" src="jquery-1.2.6.js"<br>
tal:attributes="src context++resource++tatr_jsjquery-1.2.6.js";> <br>
</script> <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>
File "/home/z3.4/lib/python/zope/publisher/publish.py", line 133, in publish<br>
result = publication.callObject(request, obj)<br>
File "/home/z3.4/lib/python/zope/app/publication/zopepublication.py", line 167, in callObject<br>
return mapply(ob, request.getPositionalArguments(), request)<br>
File "/home/z3.4/lib/python/zope/publisher/publish.py", line 108, in mapply<br>
return debug_call(obj, args)<br>
- __traceback_info__: <security proxied zope.app.publisher.browser.viewmeta.ResizingFont instance at 0x9913d6c><br>
File "/home/z3.4/lib/python/zope/publisher/publish.py", line 114, in debug_call<br>
return obj(*args)<br>
File "/home/z3.4/lib/python/zope/formlib/form.py", line 774, in __call__<br>
return self.render()<br>
File "/home/z3.4/lib/python/zope/formlib/form.py", line 768, in render<br>
self.form_result = self.template()<br>
File "/home/z3.4/lib/python/z3c/pt/pagetemplate.py", line 40, in render<br>
return template.render(**parameters)<br>
File "/home/z3.4/lib/python/chameleon/zpt/template.py", line 51, in render<br>
return super(PageTemplateFile, self).render(**kwargs)<br>
File "/home/z3.4/lib/python/chameleon/core/template.py", line 156, in render<br>
return super(TemplateFile, self).render(**kwargs)<br>
File "/home/z3.4/lib/python/chameleon/core/template.py", line 62, in render<br>
template = self.cook_check(parameters=kwargs)<br>
File "/home/z3.4/lib/python/chameleon/core/template.py", line 152, in cook_check<br>
return Template.cook_check(self, **kwargs)<br>
File "/home/z3.4/lib/python/chameleon/core/template.py", line 57, in cook_check<br>
template = self.cook(parameters=parameters, **kwargs)<br>
File "/home/z3.4/lib/python/chameleon/core/template.py", line 138, in cook<br>
template = self.compiler(**kwargs)<br>
File "/home/z3.4/lib/python/chameleon/core/template.py", line 46, in compiler<br>
encoding=self.encoding)<br>
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 517, in __init__<br>
self.root, parsed_doctype = parser.parse(body)<br>
File "/home/z3.4/lib/python/chameleon/zpt/language.py", line 250, in parse<br>
root, doctype = super(Parser, self).parse(body)<br>
File "/home/z3.4/lib/python/chameleon/core/etree.py", line 39, in parse<br>
return parse(body, self.element_mapping)<br>
File "/home/z3.4/lib/python/chameleon/core/etree.py", line 202, in parse<br>
tree = lxml.etree.parse(StringIO(body), parser)<br>
File "lxml.etree.pyx", line 2576, in lxml.etree.parse (src/lxml/lxml.etree.c:22796)<br>
File "parser.pxi", line 1483, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:60359)<br>
File "parser.pxi", line 1511, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:60613)<br>
File "parser.pxi", line 1390, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:59530)<br>
File "parser.pxi", line 932, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:56815)<br>
File "parser.pxi", line 538, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:53512)<br>
File "parser.pxi", line 624, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:54372)<br>
File "parser.pxi", line 564, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:53770)<br>
XMLSyntaxError: attributes construct error, line 12, column 16<br>
</div></div><br></div>