[Petal] attributes question

Jean-Michel Hiver jhiver at mkdoc.com
Fri Jul 25 11:16:34 BST 2003


> Just after sending that patch it struck me that there's no way to start with
> 
> <a petal:attributes="attr value"/>
> 
> and get
> 
> <a attr=""/>
> 
> because if the string is empty then you'll get
> 
> <a/>
> 
> Shouldn't this only happen when value is undef?

I can't think of an instance where that behavior would be useful.

The TAL spec states:

  If the expression associated with an attribute assignment evaluates to
  nothing, then that attribute is deleted from the statement element.

In Petal, I considered nothing to be either undef or an empty string.

Cheers,
-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/


More information about the Petal mailing list