Re: Any plans for a 100% wm syntax compatibility?

Jonathan Revusky <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Demetrios Kyriakis wrote:
> 
> Jonathan Revusky-3 wrote:
>> I have a first pass written now. I mostly did this as a 
>> technical challenge. I was curious to see how hard it is. (Answer: not 
>> very hard, I don't think.)
>>
> Wow, ... I'm speachless.
> 
> 
> Jonathan Revusky-3 wrote:
>> Since you're asking for this, I think there are a couple of things you 
>> should be willing to do.
>>
>> (1) Do some testing. (Ideally even write some unit testcases.)
>>
> Of course. I'll try my best.
> 
> 
> Jonathan Revusky-3 wrote:
>> (2) When it's fairly polished, announce it on the Velocity list. (I'm 
>> tired of talking to those people...)
>>
> Of course, even more: if it works I'm going to write some blog posts about 
> it and submit them everywhere (dzone, TSS, javaworld, etc.) :).

Sure, great.

> 
> Jonathan Revusky-3 wrote:
>> The VelBridgeTemplateCache is a trivial subclass of the regular 
>> TemplateCache that will load templates using the velocity parsing 
>> machinery IF the template's name ends in .vm OR .vtl. Otherwise, it 
>> behaves normally, just loading in freemarker templates. So, any files 
>> you test have to end in .vm or .vtl. This means that it parses it using 
>> Velocity, and then walks the Velocity tree and produces a FreeMarker 
>> tree. Then merging is done with the FreeMarker engine.
>>
> I understand. In most Velocity applications I've seen, the extension was
> not relevant and not enforcing (and was mostly suggesting the "original" or
> destination file type
> like .htm, .report or .mail ).

The extension is also meaningless in FreeMarker, just a convention. 
However, I wanted to have a TemplateCache in which FreeMarker and 
Velocity templates co-exist and there needs to be some convention to 
decide which is which.

See VelBridgeTemplateCache.java line 13. That could be changed to 
something else even. That is not so important.

Anyway, I gave instructions in a previous note. If you have any 
questions just shout.
> 
> 
> Jonathan Revusky-3 wrote:
>> Anyway, you asked for this, so I think you should test it out now.
>>
> Thank you very much. Testing this will be my next activity. I wouldn't have
> even dreamed such a fast code release :) .

Me neither. I started thinking about what would be necessary and then I 
just did it. I don't quite know why. :-)

JR

> 
> Demetrios.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.