On 2/27/06, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
Twig is much
better, but still they're not *templates*. I want to write
*templates*, not code that builds the document programmatically,
however easy the API for that might be.

I see. I'm not a fan of the concept of templating. Templating is not my cup of tea. I don't understand what excites people about that approach. But it is popular and pervsasive. I'm all about separation of data and the strategy for its manipulation. But that's just me.

Now Petal… is very, very very close. The basic idea is virtually
identical, which is no wonder, because what I'm doing is a port
of Kid[1], which is inspired by TAL. (Not a straight port; this
is supposed to be as perlish as Kid is pythonic.)

. Template expansion is streaming.

It sounds like the pre-compilation and caching of templates won't be a part of your system? Perhaps this is not necessary and should be offloaded to other things anyway.

Here is a cute way to do streaming template expansion for  Perl and HTML:
http://homepage.mac.com/pauljlucas/software/html_tree/

It was a neat idea at the time... the very very first  versions of HTML::Seamstress  basically  expanded his idea  and dropped in CPAN modules like Data::DRef for dot-notation instead of homegrowing everything.


The
template compiler is also much simpler than the one in Petal
because all I'm doing is mapping from SAX events to code snippets
during parsing.

Is this thing written? Can we try it out?

[1] http://kid.lesscode.org/

I went and looked at that... again, I don't understand people who are into that sort of thing, so either me or the templating people are from a different galaxy or something :)



Reply via email to