[Zpt] XHTML validation and <span>

Todd Coram todd@digicool.com
Fri, 9 Mar 2001 10:11:54 -0500


> >   <title tal:insert="string: The title is: ${here/title}">object
> > title</title>
> >
> > in the (future) 1.0 implementation of TALES.
> >
> > Evan, should this be legal? Should string: take paths as well as simple
> > variable names? 'Here' is a variable, so ${here} sort of makes sense.
But,
> > 'here/title' is a path....
>
> Uhoh. Why not go all the way and make it ${[expression]}?
>
> Like:
>
>   <title tal:insert="string: The title is: ${python:5*10}">object
>   title</title>

Oooh. Sick. This would be very cool (where are the language lawyers? Tim?
Guido?).
This would open us up for some potentially interesting behavior. But,  it
would also make the parsing somewhat more difficult (nested braces would
become a possibility). Here is a twisted (legal but stupid and contrived)
example:

 tal:insert = "string: hello ${string: hello ${string: world}} world"

It is not unprecedented though. "Not:" makes recursive use of the expression
engine:
  tal:define="x not: /here/value"
allows for
  tal:define=x not: not: /here/value"
and is simple to parse.