Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: HTML-Template.r ?

From: pa:russo:perd at: 2-May-2001 11:35

> > >Anyone working on a HTML::Template (Perl module) clone for REBOL ? >> >> I don't know if you are referring to something like this exactly, but >> perhaps the following example could be useful to solve your problem. >> The logic is quite simple: >> 1. An HTML template with placeholders >> 2. A set of replacement rules >> 3. A cycle that replace the placeholders using the replacement rules >> Hope it helps. >> >> -- Paolo Russo >> >It is useful, but not as a HTML::Template replacement... The real strength of >HTML::Template is loops <TMPL_LOOP NAME="a_loop">, which loops through a array >of values, repeating the HTML code produced (useful for tables etc.) and >conditional code <TMPL_IF.., <TMPL_ELSE.., <TMPL_UNLESS.., all of these can be >nested within each other, and can be hidden in comments so HTML >validators won't >complain about unknown tags. > ><TMPL_VAR NAME="something"> is easy to implement using some >replacement rules, but >the rest requires some more parsing of the given template to find >out what belongs >to what.. > >/PeO
I think it is possible an elegant solution through an approach based on recursion and self-similarity. I'm working on it and I hope to have the first results about mid-may. I'll post it here. -- Paolo Russo [pa--russo--perd--com] _________________ PERD s.r.l. Virtual Technologies for Real Solutions