A
Artur Siekielski
Hello,
I'm looking for a template engine with several characteristics:
1. Variables used in a template should be declared in template. Or the
engine should be able to parse a template and tell me what variables
are used.
2. Variables should have types, ie. an author of a template specifies
that some variable is of type 'integer' and some is of type 'enum(one,
two, three)'.
3. Templates must not be precompiled, they should be parsed
dynamically.
By "variables" I mean holes that are filled with data taken from
model.
I haven't found an engine fitting my needs. http://www.jamon.org/ is
close but it requires template precompiling.
One option is to use one of popular engine, like Velocity, and gain 1.
by parsing template by hand and 2. by using variable names convention.
Another option is to use XSLT, but achieving 1. is not simple.
If you know any better solution, please tell me,
Best regards,
Artur
I'm looking for a template engine with several characteristics:
1. Variables used in a template should be declared in template. Or the
engine should be able to parse a template and tell me what variables
are used.
2. Variables should have types, ie. an author of a template specifies
that some variable is of type 'integer' and some is of type 'enum(one,
two, three)'.
3. Templates must not be precompiled, they should be parsed
dynamically.
By "variables" I mean holes that are filled with data taken from
model.
I haven't found an engine fitting my needs. http://www.jamon.org/ is
close but it requires template precompiling.
One option is to use one of popular engine, like Velocity, and gain 1.
by parsing template by hand and 2. by using variable names convention.
Another option is to use XSLT, but achieving 1. is not simple.
If you know any better solution, please tell me,
Best regards,
Artur