Hello Velocity community,

I am new to this mailing list, my name is Christian Trutz and I am a graduate 
student (mathematics) at University Bonn in Germany. Velocity is for me a 
cool and useful tool and I want to contribute a little. 

In the actual CVS tree there is a incomplete 
org.apache.velocity.runtime.compile.Compiler class. This class wants to 
compile a template via BCEL. I think it's better to generate first a java 
file and then compile this with an usual compiler. What I mean:


Velocity file:
-----------
Hello $foo
-----------

after "compilation" you get something like this:

----------------------------------------------------------
public class CompiledTemplate {

    public void merge( Context context, Writer writer) {
           
                writer.write("Hello ");
                writer.write( context.get( "foo" ) );
    }
}
--------------------------------------------------------

Is this a good idea???

Is anybody working on a Velocity template compiler?

The AST (see JJTree) implemets the visitor pattern and any AST node has a 
render method ... why? Is rendering with a visitor not so good?


Christian

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to