[Petal] attributes question

Fergal Daly fergal at esatclear.ie
Sun Jul 27 14:26:38 BST 2003


There are times when people need to produce a tag like tag="". I think there 
are some tags in HTML that should never contain a value, for example the 
selected tag in

<option name="aaa" value="bbb" selected>

And even if they're not common, I'm sure there must be other XML vocabularies 
that have valueless tags, so this is important.

We don't need a new kind of nothing, the problem is that Petal treats "" and 
undef the same. I think "" should just be "" so

<option value="aaa" petal:attributes="selected sel" />

should give

<option value="aaa" selected="" />

when $hash->{sel} is "" and

<option value="aaa" />

when $hash->{sel} is undef

F



More information about the Petal mailing list