Casey Duncan wrote:
On Wed, 19 May 2004 16:00:43 -0400
Jim Fulton <[EMAIL PROTECTED]> wrote:


I've posted two proposals:

http://dev.zope.org/Zope3/TALESPathExpressionAdapters


I have to say I am not found of "*",

I'm not attached to '*'. Feel free to suggest alternatives (other than ':', '/', '|', or '?'. Is that all ;)

> but using the parenthesis to "cast"
the variable seems fairly natural and isn't colored by completelt
different meaning in other languages.

So the example:
  tal:content="x/y*foo.bar.baz/z"

would be:
  tal:content="x/(foo.bar.baz)y/z"

Yup

Which seems reasonable. The dotted notation seems ok, but it implies
that this notation is recognized in general in path expressions which is
confusing because it isn't. If we didn't use dots then it might look
like:
  tal:content="x/(modules/foo/bar/baz)y/z"

I'm not sure what you mean here. If the thing in the parens was a path expression, it would be:

  x/(modules/foo.bar/baz)y/z

IOW, modules excepts dotted names.

If the thing in the parenthesis is just another path expression, that
mitigates the need for namespaces IMO. The above could then become:
  tal:define="baz modules/foo/bar/baz"
  tal:content="x/(baz)y/z"

True, but then, the obvious syntax would be:

  x/baz(y)/z

which is the top of a slippery slope. :)

It would also make it harder to provide predefined adapter names.

We'd like to be able to define some adapters (e.g. 'zope', 'format', etc.)
in ZCML and let people just use them in ZPT without having to use defines.


Jim

--
Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
** 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