<div dir="ltr">This is like KSS question: why we resolve a question with the first way we find? not the better one? Is the human being. But as Steve Jobs said some time ago: only excelence people don&#39;t stop in the first way to resolve a problem<br>
<br>When I meet Zope for the first time I was absolutely impress with it<br>There was nothing better to represent an object universe<br><br>I know that Zopers have their own way (this was discuss some time ago, too) but my ideal scenario will be a minimalism Zope where everything was an URL<br>
<br>In this ideal scenario you could ask for an URL with or without parameters as if you ask for to the browser<br><br>We stop this theme to wait for a Plone2PDF or similar. I hope we could solve this in a simple way (I think if this needs a more complicated solution we will have failed)<br>
<br>I only need to put a link with the PDF download to the current page! (this don&#39;t sound to much complicated, isn&#39;t it?)<br><br><div class="gmail_quote">2008/10/12 Dieter Maurer <span dir="ltr">&lt;<a href="mailto:dieter@handshake.de">dieter@handshake.de</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;">Garito wrote at 2008-10-11 16:39 +0200:<br>
<div class="Ih2E3d">&gt;Did you imagine another way to do what I need to do?<br>
<br>
</div>I have not followed intensively &quot;what you need to do&quot;.<br>
Thus, what follows may not be adequate.<br>
<br>
When I remember right, then a PageTemplate&#39;s namespace is passed<br>
on to a &quot;Script (Python)&quot; when this script binds &quot;namespace&quot;.<br>
Thus, this way you get access to the variables defined in the template.<br>
<br>
A simple path &quot;var/s1/.../sn&quot; is roughly requivalent to<br>
<br>
 &nbsp;x = var.restricedTraverse(&quot;s1/.../sn&quot;)<br>
 &nbsp;if callable(x): x = x() # &quot;callable&quot; may not be available in &quot;Script (Python)&quot;<br>
<br>
If the path contains &quot;?var&quot;, these must be resolved beforehand.<br>
<br>
More complex paths &quot;p1 | p2 | ... pn&quot; are roughly equivalent<br>
to<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;exc = None<br>
 &nbsp; &nbsp; &nbsp; &nbsp;for p in (p1, p2, ... pn):<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try: return path1(p, ...)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;except &lt;some standard exceptions&gt;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exc = sys.exc_info()<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if exc is not None: raise exc[0], exc[1], exc[2]<br>
<br>
The most difficult part are for paths where &quot;pn&quot; is not a path<br>
expression but an arbitrary one. In this case, the concrete<br>
TALES implementation will be required for an interpretation.<br>
<br>
<br>
Along this outline, a function &quot;path(path_expr, variable_binding)&quot;<br>
can be defined which roughly behaves like &quot;path(path_expr)&quot; in<br>
a PageTemplate with the current variable binding expressed<br>
as &quot;variable_binding&quot;.<br>
<br>
For simple cases, this function could be implemented in untrusted<br>
code. Complex cases will require access to the TALES implementation<br>
and therefore probably trusted code.<br>
<br>
<br>
<br>
--<br>
<font color="#888888">Dieter<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Mis Cosas<br><a href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a><br>Zope Smart Manager<br><a href="http://blogs.sistes.net/Garito/670">http://blogs.sistes.net/Garito/670</a><br>

</div>