velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Reck <Christoph.R...@dlr.de>
Subject Re: Features are complete ?
Date Thu, 01 Feb 2001 09:27:11 GMT
Geir, could you pelase post the code of your #eval directive, maybe to 
the whiteboard? Thanks.

Thomas, you can use this code to create your own directive that does
that then. OK, stop here..., I see you want to do this from the java 
code... either:
a. just get a SimpleNode via Runtime.parse(inputStream, name), then 
   init(ica, null) it and finally render(ica, writer) it;
b. implement your own Resource - see Template.java on how to.
c. if you want resource cachning implement a ResourceLoader.
Probably the best (if a. is not sufficient) is to subclass Template 
and provide your own ResourceLoader for it.

:) Chirstoph

Thomas Fahrmeyer wrote:
> 
> I think there is one feature that is very nice to have.
> 
> I discussed this with Geir few days ago under the thread:
>         Re: AW: How can I compile and insert a external text ??
> 
> I should be able to parse the template stuff from any InputStream and the
> result should be the parsed and expanded template.
> 
> String text = UtilityClass.parse(inputstream);
> 
> It does all the merging stuff. The parser has the functionality, but it's
> not very well exposed. This not complicated, but usefull if I store the
> templates in a database for example or it comes from other external
> applications.
> 
> What do you think ?
> 
> bye
> Thomas

Mime
View raw message