[uf-rest] Microtemplates
Stephen Farrell
sfarrell at almaden.ibm.com
Mon May 15 11:43:20 PDT 2006
Hey,
I've been working on something lately I call "microtemplates" that might
be of interest to folks on this list.
The goal is to use an approach analagous to microformats to create a
pure HTML templating syntax. In fact, microtemplates can easily be
constructed to produce microtemplates. For example, data like this:
{vcard:{fn:"Steve Farrell",url:"http://smackman.com"}}
could be bound to this template:
<span class="vcard">
<a class="url fn"></a>
</span>
to produce this microformat:
<span class="vcard">
<a class="url fn" href="http://smackman.com">Steve Farrell</a>
</span>
by applying some simple binding rules. I've attempted to generalize
this approach into a complete templating solution, including a
BSD-licensed javascript library. I think this approach could be very
useful in augmenting static web pages with dynamic content, creating
mashups on plain HTML pages, and in lowering the bar for composing and
specializing web views and functions.
For more info, code and examples, please see http://microtemplates.org
More information about the microformats-rest
mailing list