Stefano Debenedetti wrote:
But I like more the syntax suggested by srid for specifying the default:
+ more similar to what other popular templating languages do, XSLT for
one but also some java-based I think
+ makes templates more useful when looked at in a browser by themselves
(w/o nevow rendering), when testing the l'n'f
The problem with that is that a lot of existing templates already use
Stuff for the web monkey to see, and you
certainly don't want that to be the default.
Also, I'd imagine it's a valid use case to want to see some "example
data" in the template, when viewed directly, and still set the default
to something else.
<p class="person">
John Doe
</p>
The biggest downside with the default="foo" syntax is its inability
to do non-strings.
Taking all of the above into consideration, I'd suggest something like
<p class="person">
MISSING
John Doe
</p>
and possibly also allow the default="MISSING", to make simple case
simple.