velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis <j...@respublica.fr>
Subject Re: Whitespace, redux
Date Thu, 11 Apr 2002 09:48:34 GMT
+1 for this proposition.

Advantages:

* backward-compatibility --set the default preprocessor to 
"CompatibilityPP" and no modification to templates/code is needed

* allows different policies depending on the needs

* allows different policies according to the type of template (in 
the same app)

* easy to implement

* still efficient

-- Denis.

On Wednesday, April 10, 2002, at 11:20  pm, Daniel Dekany wrote:

> I think the solution would be pluggable template preprocessors. 
> This will be
> useful for implementing JSP custom tag style tool calls too.
> I have looked into the soruce code (sorry if I have misinterpreted 
> it, this
> was just a quick action...) and the Template class I see this:
>
>   is = resourceLoader.getResourceStream(name);
>   ... // snip
>   BufferedReader br = new BufferedReader( new InputStreamReader( is,
> encoding ) );
>   data = rsvc.parse( br, name);
>
> My idea with pseudo code is that:
>
>   BufferedReader br = new BufferedReader(myPluggabeParser.getReader
> ( is,
> encoding ) );
>
> where the myPluggabeParser comes from the runtime configuration. 
> So that I
> can preprocess templates in a obvious and efficient way.


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message