Jim Fulton wrote:
I've posted two proposals:


Proposes a mechanism for easily using adapters in TALES expressions.

I'm not at all clear on how the proposed mechanism is superior to the implementation of path segment prefixes that exists in Zope 2. This differs from the namespace proposal that you cite, in that the object named on the left of the colon is not a namespace or adapter. It is simply a registered name that is associated with code that interprets the text to the right of the colon. This allows constuctions such as "a/sequence/index:2" (a.sequence[2]), "a/bag/var:x/call:" (a.bag[x]()), and "an/object/adapt:foo.bar" (foo.bar(an.object)).


proposes a mechanism for qualifying names defined in TAL and used in
TALES expressions.

This would of course conflict with prefixes as currently defined, and seems weakly motivated. I can imagine getting a similar effect with a more consistent syntax by allowing tal:define="x/y foo" when x supports an ITALESNamespace interface. The path "x/y/z" then does exactly what the user would expect. A namespace "x" can be created without any new TAL syntax by providing a built-in constructor, as in tal:define="x namespace", that creates an empty dictionary-like object with support with ITALESNamespace.


Evan @ 4-am

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to