[Zpt] XHTML validation and <span>

Martijn Pieters mj@digicool.com
Fri, 9 Mar 2001 15:57:21 +0100


On Fri, Mar 09, 2001 at 09:51:12AM -0500, Todd Coram wrote:
> > The following is also illegal, for example:
> >
> >  <title>The title is:
> >         <span tal:replace="here/title">object title</span>
> >  </title>
> >
> > because only text is allowed inside <title>. The solution here is to use a
> > well-aimed define, like: "python:'The title is: ' + here.title".
> 
> Or:
> 
>   <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>

-- 
Martijn Pieters
| Software Engineer  mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------