[stringtemplate-interest] "push" methods for the "pull template" recovering addict.
Jorge Vargas
jorge.vargas at gmail.com
Wed Apr 4 20:35:38 PDT 2007
Hi
first of all I'll like to thank you guys, I have to admit I got into
stringtemplate because I need "just another template engine" and since
this project is java I figure that if it was ported to python it
should be good :p. Then after reading some of the documents on the
site I notice how different it is and I'm liking it a lot.
Although I'm puzzle by the following situation: I know I know this is
wrong but what I want to do, in so mytical templating engine, will be
something like this:
#foreach( $line in $accounts )
$n.desc $n.quantity #n.total
#end
note the whitespace, I do need them and they must be fix, (requirement)
after much digging I find out in this PDF
http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf (sidenote:
great document, is there a more cpu friendly version of it?)
and in page 9, item 9.1 to be exact it finally gives me a way of how
to implement what I need without using pull methods.
my point is that this type of construct is very common, in fact is the
second thing most engines show in their tutorials, and that is where
the subject of this emails comes in, why not have an article/wiki
page/documentation with a brief translation of the common pull methods
to stringtemplates push idioms, I believe this will help new people
get involve into using the project faster which will end up in a
better wider spread of the engine.
ones again thanks for this great software it's nice to see good,
profound theory backed code.
More information about the stringtemplate-interest
mailing list